Class ContentDirectoryMountManager
Mounts Content Directories on demand and shares a single mount across every asset and scene that loads from the same load path. Replaces the previous design where a dedicated ContentDirectoryProvider loaded the directory as a shared dependency.
A directory is mounted at most once (the first EnsureMounted(string) for a resolved
path calls ContentLoadManager.RegisterContentDirectory) and then stays mounted for
the lifetime of the Addressables system. All mounts are released together by
UnmountAll(), which is called from AddressablesImpl.Dispose. All access
is expected on the main thread.
Inherited Members
Namespace: UnityEngine.ResourceManagement.ResourceProviders
Assembly: Unity.ResourceManager.dll
Syntax
public static class ContentDirectoryMountManager
Fields
| Name | Description |
|---|---|
| PathResolver | Resolves runtime placeholders (e.g. |
Methods
| Name | Description |
|---|---|
| EnsureMounted(string) | Mounts the Content Directory at the given load path if it is not already mounted, and returns its handle. The directory remains mounted until UnmountAll() is called. |
| GetRootAsset(ContentDirectoryHandle) | Finds the IAddressableRootAsset embedded in a mounted Content Directory. |
| ResolvePath(string) | Runs the configured PathResolver over a raw, symbolic load path. |
| UnmountAll() | Unmounts every Content Directory mounted through EnsureMounted(string) and clears
the table. Called from |