docs.unity.cn
    Show / Hide Table of Contents

    Class ProductAddressableLoader

    Loads products from addressables

    Inheritance
    Object
    ProductAddressableLoader
    Namespace: UnityEngine.Industrial.Configuring.ConfiguratorRuntime
    Syntax
    [Serializable]
    public class ProductAddressableLoader : IProductLoader

    Properties

    CurrentLoadableProduct

    Gets or sets the current loadable product.

    Declaration
    public AssetProductReference CurrentLoadableProduct { get; set; }
    Property Value
    Type Description
    AssetProductReference

    The current loadable product.

    InProgressLoadableProduct

    Gets or sets the in progress loadable product.

    Declaration
    public AssetProductReference InProgressLoadableProduct { get; set; }
    Property Value
    Type Description
    AssetProductReference

    The in progress loadable product.

    inProgressLoadableProductIndex

    Gets or sets the index of the in progress loadable product.

    Declaration
    public int inProgressLoadableProductIndex { get; set; }
    Property Value
    Type Description
    Int32

    The index of the in progress loadable product.

    IsLoading

    Gets a value indicating whether this instance is loading.

    Declaration
    public bool IsLoading { get; }
    Property Value
    Type Description
    Boolean

    true if this instance is loading; otherwise, false.

    Methods

    Load(Int32, AssetProductReference, Action<AsyncOperationHandle<GameObject>, GameObject, Boolean>, ProductChangedHandler)

    Loads the specified index.

    Declaration
    public AsyncOperationHandle<GameObject> Load(int index, AssetProductReference prefab, Action<AsyncOperationHandle<GameObject>, GameObject, bool> postInstantiateProduct, ProductChangedHandler onProductChanged)
    Parameters
    Type Name Description
    Int32 index

    The index.

    AssetProductReference prefab

    The prefab.

    Action<AsyncOperationHandle<GameObject>, GameObject, Boolean> postInstantiateProduct

    The post instantiate product.

    ProductChangedHandler onProductChanged

    The on product changed.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    AsyncOperationHandle<GameObject>.

    LoadProductFromAsset(Int32, AssetProductReference)

    Loads the product with the given index.

    Declaration
    public AsyncOperationHandle<GameObject> LoadProductFromAsset(int index, AssetProductReference reference)
    Parameters
    Type Name Description
    Int32 index

    The index.

    AssetProductReference reference

    The prefab.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    AsyncOperationHandle<GameObject>.

    PostUnload()

    Posts the unload.

    Declaration
    public void PostUnload()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 03 March 2021