docs.unity3d.com
    Show / Hide Table of Contents

    Class LocalAssetSourceLocation

    A basic AssetSourceLocation for loading local project assets

    Inheritance
    Object
    AssetSourceLocation
    LocalAssetSourceLocation
    Namespace: UnityEngine.Perception.Randomization
    Syntax
    public class LocalAssetSourceLocation : AssetSourceLocation

    Fields

    assets

    The list of local assets available from this source

    Declaration
    public List<Object> assets
    Field Value
    Type Description
    List<Object>

    Properties

    count

    The number of assets available at this location

    Declaration
    public override int count { get; }
    Property Value
    Type Description
    Int32
    Overrides
    AssetSourceLocation.count

    Methods

    Initialize<T>(AssetRole<T>)

    Execute setup steps before accessing assets at this location

    Declaration
    public override void Initialize<T>(AssetRole<T> assetRole)
        where T : Object
    Parameters
    Type Name Description
    AssetRole<T> assetRole

    The asset role that will be used to preprocess assets from this location

    Type Parameters
    Name Description
    T

    The type of assets that will be loaded from this location

    Overrides
    UnityEngine.Perception.Randomization.AssetSourceLocation.Initialize<T>(UnityEngine.Perception.Randomization.AssetRole<T>)

    LoadAsset<T>(Int32)

    Retrieves an asset from this location using the provided index

    Declaration
    public override T LoadAsset<T>(int index)
        where T : Object
    Parameters
    Type Name Description
    Int32 index

    The index to load the asset from

    Returns
    Type Description
    T

    The loaded asset

    Type Parameters
    Name Description
    T

    The type of asset to load

    Overrides
    AssetSourceLocation.LoadAsset<T>(Int32)

    ReleaseAssets()

    Unload all assets loaded from this location

    Declaration
    public override void ReleaseAssets()
    Overrides
    AssetSourceLocation.ReleaseAssets()
    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