docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method LoadResourceLocationsAsync

    LoadResourceLocationsAsync(IEnumerable, MergeMode, Type)

    Loads the resource locations specified by a set of keys.

    Declaration
    public static AsyncOperationHandle<IList<IResourceLocation>> LoadResourceLocationsAsync(IEnumerable keys, Addressables.MergeMode mode, Type type = null)
    Parameters
    Type Name Description
    IEnumerable keys

    The set of keys to use.

    Addressables.MergeMode mode

    The mode for merging the results of the found locations.

    Type type

    A type restriction for the lookup. Only locations of the provided type (or derived type) will be returned.

    Returns
    Type Description
    AsyncOperationHandle<IList<IResourceLocation>>

    The operation handle for the request.

    Remarks

    The operation always completes successfully and the operation handle's Result object always contains a valid IList instance. If no assets matched the specified keys, the list in Result is empty.

    See Loading assets by location for more information.

    See Operations for information on handling the asynchronous operations used to load Addressable assets.

    LoadResourceLocationsAsync(object, Type)

    Loads the resource locations specified by a key.

    Declaration
    public static AsyncOperationHandle<IList<IResourceLocation>> LoadResourceLocationsAsync(object key, Type type = null)
    Parameters
    Type Name Description
    object key

    The key for the locations.

    Type type

    A type restriction for the lookup. Only locations of the provided type (or derived type) will be returned.

    Returns
    Type Description
    AsyncOperationHandle<IList<IResourceLocation>>

    The operation handle for the request.

    Remarks

    The operation always completes successfully and the operation handle's Result object always contains a valid IList instance. If no assets matched the specified key, the list in Result is empty.

    See Loading assets by location for more information.

    See Operations for information on handling the asynchronous operations used to load Addressable assets.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)