| Parameter | Description |
|---|---|
| contentDirectoryPath | A local path pointing to a directory that contains the output from a call to BuildPipeline.BuildContentDirectory. |
Add the built-content in a directory to the ContentLoadManager. This makes it possible to load the contained Scenes and Assets.
In the runtime this is required when BuildPipeline.BuildContentDirectory has been used to build and
distribute additional content.
This can be called multiple times with different paths to expose the contents of additional content directories to
the editor/runtime. However, this method is bound to a specific directory structure and limited to one build per directory.
Use ContentLoadManager.RegisterContentDirectory lower-level API when you need more flexibility in content
organization or when registering multiple builds from custom locations.
For a clean shutdown, each call to RegisterContentDirectory should be matched with a call to
UnregisterContentDirectory.
Registering a content directory is not supported in the Editor outside of Play Mode and will throw
InvalidOperationException. Enter Play Mode before calling this method from Editor code.
Throws InvalidOperationException if called from the Editor outside of Play Mode, if the path is
already registered, or if the content manifest cannot be loaded.
Throws IO.FileNotFoundException if the required manifest hash file is not found.
Throws IO.DirectoryNotFoundException if the directory does not exist.