Version: 2023.2
언어: 한국어
에셋 번들 워크플로
에셋 번들 종속성

에셋 번들을 위한 에셋 준비

When defining AssetBundles there are a few rules to be aware of:

  • Scenes and Assets can’t be included together in the same AssetBundle. An individual AssetBundle can only contain either Scenes or Assets.
  • A specific Scene or Asset can’t be assigned to more than one AssetBundle
  • AssetBundles can’t contain Script assets
  • Files inside the StreamingAssets folder cannot be put in an AssetBundle
  • The AssetBundle name cannot match the name of the output folder
  • An AssetBundle can only be loaded on the specific platform that it was built for.
  • The Editor can load any AssetBundle, regardless of the current platform selected in the Build Settings. However individual Assets inside an AssetBundle may not load or render successfully if they use a platform specific-format that is not supported on your Editor’s platform. For example, Android shaders may render as magenta in the Windows Editor.

Beyond those rules you are free to assign any asset to any bundle you desire. However, there are certain strategies to consider when setting up your bundles.

논리적 엔티티 그룹화(Logical Entity Grouping)

Logical Entity Grouping is a strategy you can use to decide how to organize what goes into each of your project’s AssetBundles. The principle is to base your decisions on the functional portion of the project that each piece of content represents. This includes sections such as User-Interface, characters, environments, and anything else that may appear frequently throughout the lifetime of the application.

예제

  • 사용자 인터페이스 화면의 모든 텍스처 및 레이아웃 데이터 번들링
  • 문자/문자 집합의 모든 모델 및 애니메이션 번들링
  • 여러 레벨에서 공유되는 배경 조각의 텍스처 및 모델 번들링

Organizing your AssetBundles by Logical Entity Grouping is ideal for downloadable content (DLC), because it allows you to more easily make small changes to your project which don’t require your users to re-download large amounts of additional, unchanged, assets.

이 전략을 올바르게 이행하는 데 가장 중요한 비결은 에셋을 각 번들에 할당하는 개발자가 각 에셋이 프로젝트에서 사용될 시기와 위치를 정확히 알아야 한다는 것입니다.

타입 그룹화(Type Grouping)

Type Grouping is a strategy where you assign assets of similar type, such as audio tracks or language localization files, to a single AssetBundle.

Type grouping can be useful to establish AssetBundles that change rarely. Grouping AssetBundles this way may result in fewer AssetBundles changing and requiring distribution when an incremental build is done. The downside is that more AssetBundles may need to be downloaded and loaded to assemble all dependent objects together at runtime.

동시 콘텐츠 그룹화(Concurrent Content Grouping)

동시 콘텐츠 그룹화는 동시에 로드되고 사용될 에셋을 하나의 번들로 묶는 개념입니다. 이 번들 타입은 각 레벨의 캐릭터, 텍스처, 음악 등이 완전히 다른 레벨 기반 게임에 사용되는 번들 타입이라고 생각할 수 있습니다. 이런 에셋 번들 중 하나에 있는 에셋이 해당 번들의 나머지 에셋이 사용되는 시간에만 동시에 사용된다고 100% 확신할 수 있기를 원합니다. 동시 콘텐츠 그룹화 번들에 포함된 에셋 하나에 종속성이 있으면 로드 시간이 크게 증가합니다. 해당 에셋의 전체 번들을 다운로드해야 하기 때문입니다.

동시 콘텐츠 그룹화의 가장 일반적인 이용 사례는 씬 기반 번들입니다. 이 할당 전략에서는 각 씬 번들에 해당 씬 종속성이 모두 포함되거나 대부분 포함됩니다.

Note: When building an AssetBundle containing a Scene, any Assets referenced by that Scene will also be automatically included in the AssetBundle, unless those Assets are explicitly assigned to a different AssetBundle. This is convenient when doing Concurrent Content Grouping, but you need to keep an eye out for duplicated assets if any referenced assets are also used by other scenes that you are building into separate AssetBundles.

Additional Tips

A project absolutely can and should mix these strategies as your needs require. Using the optimal asset assignment strategy for any given scenario greatly increases efficiency for any project.

예를 들어. 한 프로젝트에서 다양한 플랫폼의 사용자 인터페이스(UI) 요소를 자체적인 플랫폼 UI 관련 번들로 그룹화하지만 대화식 콘텐츠는 레벨/씬별로 그룹화하기로 결정할 수 있습니다.

어떤 전략을 따르든 관계없이, 아래의 추가 팁을 항상 염두에 두는 것이 좋습니다.

  • 자주 업데이트되는 오브젝트는 변경 빈도가 낮은 오브젝트와 다른 별개의 에셋 번들로 나누십시오.
  • 동시에 로드될 가능성이 큰 오브젝트(모델, 텍스처 및 애니메이션 등)를 그룹화하십시오.
  • 완전히 다른 에셋 번들의 에셋 하나에 종속된 여러 에셋 번들에 오브젝트 여러 개 있는 경우, 별도의 에셋 번들로 종속성을 옮기십시오. 여러 에셋 번들이 다른 에셋 번들의 동일한 에셋 그룹을 참조하는 경우, 이런 종속성을 공용 에셋 번들로 모아서 중복을 줄이면 효과적일 수 있습니다.
  • If two sets of objects are unlikely to ever be loaded at the same time, such as Standard and High Definition assets, be sure they are in different AssetBundles.
  • Consider splitting apart an AssetBundle if less than 50% of that bundle is ever frequently loaded at the same time
  • Consider combining AssetBundles that are small but whose content is frequently loaded simultaneously
  • 오브젝트 그룹이 단순히 같은 오브젝트의 다른 버전에 불과할 경우, 에셋 번들 배리언트를 고려하십시오.
에셋 번들 워크플로
에셋 번들 종속성
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961