Each call to BuildPipeline.BuildContentDirectory populates the specified output directory with the built content from one or more root assets.
At runtime, a script must call ContentLoadManager.RegisterContentDirectory once per content directory to make its content available:
ContentDirectoryHandle handle = ContentLoadManager.RegisterContentDirectory(localPath);
This loads the build manifest for the content directory to populate in-memory data structures. Root assets from the registered content directory become available through the ContentLoadManager APIs.
After registering a content directory, you can call ContentLoadManager.GetRootAssets to discover what root assets are available inside it.
When attempting to load an asset or sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary, Unity searches through the loaded content directories in reverse order of their registration, meaning the last registered is the first searched, as in a stack.
To clean up resources, call ContentLoadManager.UnregisterContentDirectory once per content directory after Loadable.Release has been called on each loaded asset, and after each scene has been unloaded (for example, via SceneManager.UnloadSceneAsync). Unity logs an error if UnregisterContentDirectory is called while any files are open.