文档

Unity Engine


User Manual

Script Reference

Unity Engine


Use content directories to load assets at runtime

Build, distribute, and load separate content builds to ship alongside a Player build.
阅读时间1 分钟最后更新于 1 个月前

Content directories let you build your project's assets into separate content builds that you ship and load alongside a Player build, which reduces build size and asset duplication. They're designed to be a replacement for the AssetBundle system, and are compatible with the Addressables package.
Content directories support local content only. To distribute content remotely, or download it after a user installs your application, use the AssetBundle system or build your own distribution mechanism.

Topic

Description

Introduction to content directoriesUnderstand what content directories are, how they compare to AssetBundles, and when to use them.
Create content directoriesDefine ScriptableObject root assets, which contain the assets of your project to build into a content directory.
Reference content in a content directoryUse loadable references to include assets in a content build.
ScriptableObject designs for content directoriesCompare ScriptableObject designs that track the assets you build into a content directory.
Include scenes in a content buildUse loadable references to reference and load scenes from a content directory at runtime.
Load content directoriesRegister a content directory at runtime and access its assets.

Additional resources