docs.unity3d.com
    Show / Hide Table of Contents

    Method LoadContentCatalogAsync

    LoadContentCatalogAsync(String, String)

    Additively load catalogs from runtime data.

    Declaration
    public static AsyncOperationHandle<IResourceLocator> LoadContentCatalogAsync(string catalogPath, string providerSuffix = null)
    Parameters
    Type Name Description
    String catalogPath

    The path to the runtime data.

    String providerSuffix

    This value, if not null or empty, will be appended to all provider ids loaded from this data.

    Returns
    Type Description
    AsyncOperationHandle<IResourceLocator>

    The operation handle for the request.

    Remarks

    You can cache content catalog by providing the hash file created for the catalog by the Addressables content build at the same URL as the catalog JSON file. The Addressables system uses this hash file to determine if the cached catalog needs to be updated. If the value in the hash file has not changed since the last time you loaded the same catalog, this function loads the cached version instead of downloading the catalog. If the hash value has changed or if no hash file is provided, Addressables downloads the catalog from the specified path before loading it into memory.

    See also: Managing catalogs at runtime

    LoadContentCatalogAsync(String, Boolean, String)

    Additively load catalogs from runtime data.

    Declaration
    public static AsyncOperationHandle<IResourceLocator> LoadContentCatalogAsync(string catalogPath, bool autoReleaseHandle, string providerSuffix = null)
    Parameters
    Type Name Description
    String catalogPath

    The path to the runtime data.

    Boolean autoReleaseHandle

    If true, the async operation handle will be automatically released on completion. Typically, there is no reason to hold on to the handle for this operation.

    String providerSuffix

    This value, if not null or empty, will be appended to all provider ids loaded from this data.

    Returns
    Type Description
    AsyncOperationHandle<IResourceLocator>

    The operation handle for the request.

    Remarks

    You can cache content catalog by providing the hash file created for the catalog by the Addressables content build at the same URL as the catalog JSON file. The Addressables system uses this hash file to determine if the cached catalog needs to be updated. If the value in the hash file has not changed since the last time you loaded the same catalog, this function loads the cached version instead of downloading the catalog. If the hash value has changed or if no hash file is provided, Addressables downloads the catalog from the specified path before loading it into memory.

    See also: Managing catalogs at runtime

    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