중요한 참고 사항: 에셋 번들 관리자는 2018.2 이상의 Unity 버전에서 지원이 중단될 예정입니다. 에셋 스토어에서는 더 이상 제공되지 않지만, AssetBundleDemo Bitbucket 저장소에서는 계속 다운로드할 수 있습니다. Unity 버전 2018.2 이상을 사용하는 경우 어드레서블 에셋에 대한 문서를 참조하십시오.
에셋 번들에 속한 UnityEngine.Objects
중 하나 이상이 다른 번들에 있는 UnityEngine.Object
에 대한 레퍼런스를 가지고 있을 경우 해당 에셋 번들은 다른 에셋 번들에 종속합니다. 하지만, UnityEngine.Object
에 에셋 번들이 포함되지 않은 UnityEngine.Object
에 대한 레퍼런스가 포함되어 있으면 종속 관계는 형성되지 않습니다. 이 경우 번들이 종속하는 오브젝트가 에셋 번들이 빌드되는 번들로 복사됩니다. 만약 다수의 번들에 존재하는 다수의 오브젝트가 특정 번들에 할당되지 않은 동일한 오브젝트에 대한 레퍼런스가 포함된 경우, 해당 오브젝트에 종속 관계를 가지는 모든 번들은 해당 오브젝트를 각각 복사하여 빌드된 에셋 번들에 포함합니다.
에셋 번들이 종속성을 포함하는 경우, 인스턴스화하는 오브젝트가 로딩되기 이전에 종속성을 가지는 번들이 로딩되도록 해야 합니다. Unity 엔진은 종속성을 자동으로 로딩하지 않습니다.
예제를 하나 들어보겠습니다. 번들 1 에 있는 머티리얼이 번들 2 에 있는 텍스처를 참조한다고 가정하겠습니다.
이 경우 번들 1 의 머티리얼을 로딩하기 이전, 번들 2 를 메모리로 로딩해야 합니다. 번들 1 과 번들 2 를 로딩하는 순서는 중요하지 않습니다. 다만, 번들 1 의 머티리얼이 로딩되기 이전에 번들 2 가 로딩되어야만 합니다. 다음 섹션에서는 이전 섹션에서 다룬 AssetBundleManifest
오브젝트를 활용하여 어떻게 런타임 시점에 종속성을 결정하고 로딩할 수 있는지 알아보겠습니다.
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.