docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AssetLoading

    A class for the asset loading wrapper provided to a GraphRunner.

    Inheritance
    object
    AssetLoading
    EditorAssetLoading
    RuntimeAssetLoading
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Importer
    Assembly: Unity.Importer.dll
    Syntax
    public abstract class AssetLoading

    Properties

    AssetPath

    The path of the imported file.

    Declaration
    public virtual string AssetPath { get; }
    Property Value
    Type Description
    string

    Methods

    DependsOnSourceAsset(string)

    Declares a dependency to an other file in the project.

    Declaration
    public virtual void DependsOnSourceAsset(string filePath)
    Parameters
    Type Name Description
    string filePath

    The path of the file to depends on. It can be a path in the Assets folder or any Package.

    Remarks

    Changing, removing, or adding a file at that path in the project will re-import the asset declaring that dependency. AssetImportContext.

    GetAssetAtPath<T>(string)

    Loads another asset at the given path and adds a dependency to the loaded artifact.

    Declaration
    public virtual T GetAssetAtPath<T>(string filePath) where T : Object
    Parameters
    Type Name Description
    string filePath

    The path of the file generating the artifacts to depend on. It can be a path in the Assets folder or any Package.

    Returns
    Type Description
    T

    The Asset instance at the given filePath.

    Type Parameters
    Name Description
    T

    The type of asset to load.

    Remarks

    If the imported artifact at the given path is changed, this will re-import the asset loading it. AssetImportContext.

    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)