728x90
반응형
Unity AssetBundle.RecompressAssetBundleAsync
유니티 에셋번들파일을 재압축하여 저장하는 함수.
[사용이유]
UnityWebRequestAssetBundle를 통해 로드된 LZMA 압축 에셋 번들은 자동으로 LZ4 압축 포맷을 통해 다시 압축되어 로컬 파일 시스템에 캐시된다.
UnityWebRequestAssetBundle를 사용하지 않고 LZMA 압축 에셋 번들을 로컬디스크에 저장할경우 에셋번들 로드가 상당히 무거워진다.
AssetBundle.RecompressAssetBundleAsync를 활용하여 다운받은 LZMA형식의 에셋번들을 가벼운 형식으로 재압축하여 앱네 로드를 빠르게 할 수 있다.
[함수원형]
public static AssetBundleRecompressOperation RecompressAssetBundleAsync(string inputPath, string outputPath, BuildCompression method, uint expectedCRC, ThreadPriority priority);
[Parameters]
이름 | 타입 | 설명 |
inputPath | string | 재구성할 에셋 번들 경로 |
outputPath | string | 재구성 후 에셋번들 저장 경로 |
method | BuildCompression | 압축형식 |
expectedCRC | uint | 0 |
priority | ThreadPriority | 압축 실행 우선 순위 |
728x90
반응형
'개발 > UNITY' 카테고리의 다른 글
Unity Asset - Bolt 설치하기 (0) | 2020.10.23 |
---|---|
[UNITY]AssetBundle 압축 종류 (0) | 2020.10.06 |
[UNITY]Null Reference Exception이란 무엇입니까? (0) | 2020.07.24 |
[UNITY]유니티에서 알아야 할 필수 클래스 (0) | 2020.07.24 |
[UNITY]이벤트 함수의 실행 순서 (0) | 2020.07.24 |
댓글