커스텀 에셋 팩을 만들려면 .androidpack
으로 끝나는 이름을 가진 디렉토리를 만들어야 합니다. 이 디렉토리를 프로젝트의 에셋 디렉토리나 다른 하위 디렉토리에 배치할 수 있습니다.
중요:Unity는 .androidpack
디렉토리에서 에셋을 임포트하지 않으므로 커스텀 에셋 팩의 에셋을 Unity 씬에서 직접 사용할 수 없습니다.커스텀 에셋 팩의 에셋을 사용하려면 런타임 시 수동으로 액세스하여 동적으로 로드해야 합니다.자세한 방법은 런타임 시 에셋 팩 관리를 참조하십시오.
다음 단계에서는 MyAssets1로 이름이 지정된 커스텀 에셋 팩 생성 방법을 설명합니다.
MyAssets1.androidpack
으로 지정합니다.이것이 새 에셋 팩의 루트 폴더입니다.에셋 팩의 콘텐츠는 Android Studio에서 예상하는 구조와 일치해야 하며, 그렇지 않으면 프로젝트 빌드가 실패합니다.예상되는 구조에 대한 자세한 내용은 Asset Delivery 통합을 참조하십시오.유일한 예외는 build.gradle
파일을 추가할 필요가 없다는 것입니다.Assets1.androidpack
및 MyAssets1.androidpack
처럼 유사한 에셋 팩 이름은 Android 앱 번들(AAB) 빌드 실패를 유발합니다.src/main/assets
.on-demand
로 설정되어 있으므로 전송 모드를 변경하지 않으면 런타임 시 에셋 팩을 수동으로 다운로드해야 합니다.자세한 방법은 런타임 시 에셋 팩 관리를 참조하십시오.build.gradle
이라는 파일을 생성하십시오.다음을 파일에 붙여넣습니다.apply plugin: 'com.android.asset-pack'
assetPack {
packName = "MyAssets1"
dynamicDelivery {
deliveryType = "fast-follow"
}
}
이렇게 하면 전송 모드가 fast-follow
로 설정되어 Google Play가 애플리케이션을 설치한 후 에셋 팩을 자동으로 다운로드합니다.이 파일의 포맷에 대한 내용은 Asset Delivery 통합을 참조하십시오.
참고:build.gradle
파일에 지정한 packName
은 ’.androidpack` 확장자 없이 설정한 에셋 팩 디렉토리 이름과 일치해야 합니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.