docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method LoadAsset

    LoadAsset(string)

    Load an asset from the specified asset path.

    Declaration
    public static TContainer LoadAsset(string assetPath)
    Parameters
    Type Name Description
    string assetPath

    The asset path to load from.

    Returns
    Type Description
    TContainer

    The loaded asset if successful, null otherwise.

    LoadAsset(GUID)

    Load an asset from the specified asset UnityEditor.GUID.

    Declaration
    public static TContainer LoadAsset(GUID assetGuid)
    Parameters
    Type Name Description
    GUID assetGuid

    The asset UnityEditor.GUID to load from.

    Returns
    Type Description
    TContainer

    The loaded asset if successful, null otherwise.

    In This Article
    Back to top
    Copyright © 2024 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)