docs.unity3d.com
    Show / Hide Table of Contents

    Class Addressables

    Entry point for Addressable API, this provides a simpler interface than using ResourceManager directly as it assumes string address type.

    Inheritance
    Object
    Addressables
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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.

    Methods

    Name Description
    AddResourceLocator(IResourceLocator, String, IResourceLocation)

    Add a resource locator.

    CheckForCatalogUpdates(Boolean)

    Checks all updatable content catalogs for a new version.

    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.

    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 key. Cached assets require no download and thus their download size will be 0. The Result of the operation is the download size in bytes.

    GetDownloadSizeAsync(IList<Object>)

    Determines the required download size, dependencies included, for the specified keys. Cached assets require no download and thus their download size will be 0. The Result of the operation is the download size in bytes.

    GetDownloadSizeAsync(IEnumerable)

    Determines the required download size, dependencies included, for the specified keys. Cached assets require no download and thus their download size will be 0. The Result of the operation is the download size in bytes.

    GetDownloadSizeAsync(Object)

    Determines the required download size, dependencies included, for the specified key. Cached assets require no download and thus their download size will be 0. The Result of the operation is the download size in bytes.

    GetDownloadSizeAsync(String)

    Determines the required download size, dependencies included, for the specified key. Cached assets require no download and thus their download size will be 0. The Result of the operation is the download size in bytes.

    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.

    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)

    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. If any locations from the final list fail, all successful loads and dependencies will be released. The returned .Result will be null, and .Status will be Failed. See the Loading Addressable Assets documentation for more details.

    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 the keys. The method will always return success, with a valid IList of results. If nothing matches keys, IList will be empty.

    See Loading assets by location for more information.

    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(IResourceLocation, LoadSceneMode, 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(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 one of the overloads of InstantiateAsync(IResourceLocation, InstantiationParameters, Boolean).

    ReleaseInstance(AsyncOperationHandle)

    Releases and destroys an object that was created via one of the overloads of InstantiateAsync(IResourceLocation, InstantiationParameters, Boolean).

    ReleaseInstance(AsyncOperationHandle<GameObject>)

    Releases and destroys an object that was created via one of the overloads of InstantiateAsync(IResourceLocation, InstantiationParameters, Boolean).

    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(SceneInstance, Boolean)

    Release scene

    UnloadSceneAsync(AsyncOperationHandle, Boolean)

    Release scene

    UnloadSceneAsync(AsyncOperationHandle<SceneInstance>, Boolean)

    Release scene

    UnloadSceneAsync(SceneInstance, Boolean)

    Release scene

    UpdateCatalogs(IEnumerable<String>, Boolean)

    Update the specified catalogs.

    In This Article
    • Fields
    • Properties
    • Methods
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023