UnregisterContentDirectory(ContentDirectoryHandle)
Remove access to content that had been loaded from a content directory.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: Unity.Loading
- Assembly: UnityEngine.ContentLoadModule
public static void UnregisterContentDirectory(ContentDirectoryHandle contentDirectory)
Parameters
Content directory handle to unregister
Remarks
Before calling this, release everything that was loaded from the content directory. Release each Loadable<T> with Loadable<T>.Release, and unload each scene that was loaded from a LoadableSceneId. Use SceneManager.GetSceneByLoadableSceneId to get the loaded scene and unload it through the SceneManager API.
For content directories registered in Play mode, call this before exiting Play mode.