Class Addressables
Entry point for Addressable API, this provides a simpler interface than using ResourceManager directly as it assumes string address type.
Inherited Members
Namespace: UnityEngine.AddressableAssets
Syntax
public static class Addressables
Fields
Name | Description |
---|---|
kAddressablesRuntimeBuildLogPath | The name of the PlayerPrefs value used to set the path to check for build logs that need to be shown in the runtime. |
kAddressablesRuntimeDataPath | The name of the PlayerPrefs value used to set the path to load the addressables runtime data file. |
LibraryPath | The path to the Addressables Library subfolder |
Properties
Name | Description |
---|---|
BuildPath | The path used by the Addressables system for its initialization data. |
InitializationOperation | Initialization operation. You can register a callback with this if you need to run code after Addressables is ready. Any requests made before this operaton completes will automatically cahin to its result. |
InstanceProvider | The Instance Provider used by the Addressables System. |
InternalIdTransformFunc | Functor to transform internal ids before being used by the providers. |
PlayerBuildDataPath | The path that addressables player data gets copied to during a player build. |
ResourceLocators | Gets the collection of configured IResourceLocator objects. Resource Locators are used to find IResourceLocation objects from user-defined typed keys. |
ResourceManager | Stores the ResourceManager associated with this Addressables instance. |
RuntimePath | The path used by the Addressables system to load initialization data. |
StreamingAssetsSubFolder | The subfolder used by the Addressables system for its initialization data. |
WebRequestOverride | Delegate that can be used to override the web request options before being sent. |
Methods
Name | Description |
---|---|
AddResourceLocator(IResourceLocator, String, IResourceLocation) | Add a resource locator. |
CheckForCatalogUpdates(Boolean) | Checks all updatable content catalogs for a new version. |
CleanBundleCache(IEnumerable<String>) | Removes any AssetBundles that are no longer referenced in the bundle cache. This can occur when a new, updated catalog excludes entries present in an older catalog. |
ClearDependencyCacheAsync(IList<Object>) | Clear the cached AssetBundles for a list of Addressable keys. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(IList<Object>, Boolean) | Clear the cached AssetBundles for a list of Addressable keys. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(IList<IResourceLocation>) | Clear the cached AssetBundles for a list of Addressable locations. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(IList<IResourceLocation>, Boolean) | Clear the cached AssetBundles for a list of Addressable locations. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(IEnumerable) | Clear the cached AssetBundles for a list of Addressable keys. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(IEnumerable, Boolean) | Clear the cached AssetBundles for a list of Addressable keys. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(Object) | Clear the cached AssetBundles for a given key. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(Object, Boolean) | Clear the cached AssetBundles for a given key. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(String) | Clear the cached AssetBundles for a list of Addressable keys. Operation may be performed async if Addressables is initializing or updating. |
ClearDependencyCacheAsync(String, Boolean) | Clear the cached AssetBundles for a list of Addressable keys. Operation may be performed async if Addressables is initializing or updating. |
ClearResourceLocators() | Remove all locators. |
CreateCatalogLocationWithHashDependencies<T>(String) | Given a location path that points to a remote content catalog, create a location with the assumed dependencies that point to remote, and local, hash files respectively. The first dependency, remote, assumes that the .hash file is located beside the provided location of the .json catalog file. The second dependency, local, points to a location inside the Addressables local cache data folder. The Addressables local cache data folder is meant for content catalogs and is not the same cache location for AssetBundles. |
CreateCatalogLocationWithHashDependencies<T>(String, String) | Given a location path that points to a remote content catalog and its corresponding remote hash file, create a location with the dependencies
that point to remote, and local, hash files respectively. The first dependency, remote, uses the provided remote hash location. |
CreateCatalogLocationWithHashDependencies<T>(IResourceLocation) | Given a location path that points to a remote content catalog, create a location with the assumed dependencies that point to remote, and local, hash files respectively. The first dependency, remote, assumes that the .hash file is located beside the provided location of the .json catalog file. The second dependency, local, points to a location inside the Addressables local cache data folder. The Addressables local cache data folder is meant for content catalogs and is not the same cache location for AssetBundles. |
DownloadDependencies(Object) | Downloads dependencies of assets marked with the specified label or address. |
DownloadDependenciesAsync(IList<Object>, Addressables.MergeMode, Boolean) | Downloads dependencies of assets marked with the specified labels or addresses. See the DownloadDependenciesAsync documentation for more details. |
DownloadDependenciesAsync(IList<IResourceLocation>, Boolean) | Downloads dependencies of assets at the specified locations. |
DownloadDependenciesAsync(IEnumerable, Addressables.MergeMode, Boolean) | Downloads dependencies of assets identified by a list of keys. |
DownloadDependenciesAsync(Object, Boolean) | Downloads dependencies of assets identified with the specified label or address. |
GetDownloadSize(Object) | Determines the required download size, dependencies included, for the specified |
GetDownloadSizeAsync(IList<Object>) | Determines the required download size, dependencies included, for the specified |
GetDownloadSizeAsync(IEnumerable) | Determines the required download size, dependencies included, for the specified |
GetDownloadSizeAsync(Object) | Determines the required download size, dependencies included, for the specified |
GetDownloadSizeAsync(String) | Determines the required download size, dependencies included, for the specified |
GetLocatorInfo(String) | Given the Id of an IResourceLocator, get the relevant content catalog data associated with it. |
GetLocatorInfo(IResourceLocator) | Given the Id of an IResourceLocator, get the relevant content catalog data associated with it. |
Initialize() | Initialize Addressables system. Addressables will be initialized on the first API call if this is not called explicitly. |
InitializeAsync() | Initialize the Addressables system, if needed. |
InitializeAsync(Boolean) | Initialize the Addressables system, if needed. |
Instantiate(Object, InstantiationParameters, Boolean) | Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. |
Instantiate(Object, Transform, Boolean, Boolean) | Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. |
Instantiate(Object, Vector3, Quaternion, Transform, Boolean) | Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. |
Instantiate(IResourceLocation, InstantiationParameters, Boolean) | Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. |
Instantiate(IResourceLocation, Transform, Boolean, Boolean) | Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. |
Instantiate(IResourceLocation, Vector3, Quaternion, Transform, Boolean) | Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. |
InstantiateAsync(Object, InstantiationParameters, Boolean) | Instantiate a single object. |
InstantiateAsync(Object, Transform, Boolean, Boolean) | Instantiate a single object. |
InstantiateAsync(Object, Vector3, Quaternion, Transform, Boolean) | Instantiate a single object. |
InstantiateAsync(IResourceLocation, InstantiationParameters, Boolean) | Instantiate a single object. |
InstantiateAsync(IResourceLocation, Transform, Boolean, Boolean) | Instantiate a single object. |
InstantiateAsync(IResourceLocation, Vector3, Quaternion, Transform, Boolean) | Instantiate a single object. |
LoadAsset<TObject>(Object) | Load a single asset |
LoadAsset<TObject>(IResourceLocation) | Load a single asset |
LoadAssetAsync<TObject>(Object) | Loads a single Addressable asset identified by a key such as an address or label. |
LoadAssetAsync<TObject>(IResourceLocation) | Loads a single Addressable asset identified by an IResourceLocation. |
LoadAssets<TObject>(IList<Object>, Action<TObject>, Addressables.MergeMode) | Load multiple assets |
LoadAssets<TObject>(IList<IResourceLocation>, Action<TObject>) | Load multiple assets |
LoadAssets<TObject>(Object, Action<TObject>) | Load mutliple assets See the Loading Addressable Assets documentation for more details. |
LoadAssetsAsync<TObject>(IList<Object>, Action<TObject>, Addressables.MergeMode) | Loads multiple assets identified by a list of keys. |
LoadAssetsAsync<TObject>(IList<Object>, Action<TObject>, Addressables.MergeMode, Boolean) | Load multiple assets. Each key in the provided list will be translated into a list of locations. Those many lists will be combined down to one based on the provided MergeMode. See the Loading Addressable Assets documentation for more details. |
LoadAssetsAsync<TObject>(IList<IResourceLocation>, Action<TObject>) | Loads multiple assets, based on the list of locations provided. |
LoadAssetsAsync<TObject>(IList<IResourceLocation>, Action<TObject>, Boolean) | Loads multiple assets, based on the list of locations provided. |
LoadAssetsAsync<TObject>(IEnumerable, Action<TObject>, Addressables.MergeMode) | Loads multiple assets identified by a list of keys. |
LoadAssetsAsync<TObject>(IEnumerable, Action<TObject>, Addressables.MergeMode, Boolean) | Loads multiple assets, identified by a set of keys. |
LoadAssetsAsync<TObject>(Object, Action<TObject>) | Loads multiple assets identified by a single key. |
LoadAssetsAsync<TObject>(Object, Action<TObject>, Boolean) | Loads multiple assets identified by a single key. |
LoadContentCatalog(String, String) | Additively load catalogs from runtime data. The settings are not used. |
LoadContentCatalogAsync(String, Boolean, String) | Additively load catalogs from runtime data. |
LoadContentCatalogAsync(String, String) | Additively load catalogs from runtime data. |
LoadResourceLocations(IList<Object>, Addressables.MergeMode, Type) | Loads the resource locations specified by the keys. The method will always return success, with a valid IList of results. If nothing matches keys, IList will be empty |
LoadResourceLocations(Object, Type) | Request the locations for a given key. The method will always return success, with a valid IList of results. If nothing matches key, IList will be empty |
LoadResourceLocationsAsync(IList<Object>, Addressables.MergeMode, Type) | Loads the resource locations specified by a list of keys. |
LoadResourceLocationsAsync(IEnumerable, Addressables.MergeMode, Type) | Loads the resource locations specified by a set of keys. |
LoadResourceLocationsAsync(Object, Type) | Loads the resource locations specified by a key. |
LoadScene(Object, LoadSceneMode, Boolean, Int32) | Load scene. |
LoadScene(IResourceLocation, LoadSceneMode, Boolean, Int32) | Load scene. |
LoadSceneAsync(Object, LoadSceneMode, Boolean, Int32) | Loads an Addressable Scene asset. |
LoadSceneAsync(Object, LoadSceneParameters, Boolean, Int32) | Loads an Addressable Scene asset. |
LoadSceneAsync(IResourceLocation, LoadSceneMode, Boolean, Int32) | Loads an Addressable Scene asset. |
LoadSceneAsync(IResourceLocation, LoadSceneParameters, Boolean, Int32) | Loads an Addressable Scene asset. |
Log(String) | Debug.Log wrapper method that is contional on the ADDRESSABLES_LOG_ALL symbol definition. This can be set in the Player preferences in the 'Scripting Define Symbols'. |
LogError(String) | Debug.LogError wrapper method. |
LogErrorFormat(String, Object[]) | Debug.LogErrorFormat wrapper method. |
LogException(Exception) | Debug.LogException wrapper method. |
LogException(AsyncOperationHandle, Exception) | Debug.LogException wrapper method. |
LogFormat(String, Object[]) | Debug.LogFormat wrapper method that is contional on the ADDRESSABLES_LOG_ALL symbol definition. This can be set in the Player preferences in the 'Scripting Define Symbols'. |
LogWarning(String) | Debug.LogWarning wrapper method. |
LogWarningFormat(String, Object[]) | Debug.LogWarningFormat wrapper method. |
Release(AsyncOperationHandle) | Release the operation and its associated resources. |
Release<TObject>(TObject) | Release asset. |
Release<TObject>(AsyncOperationHandle<TObject>) | Release the operation and its associated resources. |
ReleaseInstance(GameObject) | Releases and destroys an object that was created via Addressables.InstantiateAsync. |
ReleaseInstance(AsyncOperationHandle) | Releases and destroys an object that was created via Addressables.InstantiateAsync. |
ReleaseInstance(AsyncOperationHandle<GameObject>) | Releases and destroys an object that was created via Addressables.InstantiateAsync. |
RemoveResourceLocator(IResourceLocator) | Remove a locator; |
ResolveInternalId(String) | Used to resolve a string using addressables config values |
UnloadScene(AsyncOperationHandle, Boolean) | Release scene |
UnloadScene(AsyncOperationHandle<SceneInstance>, Boolean) | Release scene |
UnloadScene(AsyncOperationHandle<SceneInstance>, UnloadSceneOptions, Boolean) | Release scene |
UnloadScene(SceneInstance, Boolean) | Release scene |
UnloadSceneAsync(AsyncOperationHandle, Boolean) | Release scene |
UnloadSceneAsync(AsyncOperationHandle, UnloadSceneOptions, Boolean) | Release scene |
UnloadSceneAsync(AsyncOperationHandle<SceneInstance>, Boolean) | Release scene |
UnloadSceneAsync(SceneInstance, Boolean) | Release scene |
UnloadSceneAsync(SceneInstance, UnloadSceneOptions, Boolean) | Release scene |
UpdateCatalogs(Boolean, IEnumerable<String>, Boolean) | Update the specified catalogs. |
UpdateCatalogs(IEnumerable<String>, Boolean) | Update the specified catalogs. |