docs.unity3d.com
    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)

    Deprecated load method

    Declaration
    [Obsolete("Please use Load(int index, AssetProductReference prefab, PostInstantiateProductHandler postInstantiateProduct, ProductLoadFailedHandler productLoadFailed) method instead.")]
    public AsyncOperationHandle<GameObject> Load(int index, AssetProductReference prefab, Action<AsyncOperationHandle<GameObject>, GameObject, bool> postInstantiateProduct, ProductChangedHandler onProductChanged)
    Parameters
    Type Name Description
    Int32 index
    AssetProductReference prefab
    Action<AsyncOperationHandle<GameObject>, GameObject, Boolean> postInstantiateProduct
    ProductChangedHandler onProductChanged
    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    Load(Int32, AssetProductReference, ProductAddressableLoader.PostInstantiateProductHandler, ProductAddressableLoader.ProductLoadFailedHandler)

    Loads the specified index.

    Declaration
    public AsyncOperationHandle<GameObject> Load(int index, AssetProductReference prefab, ProductAddressableLoader.PostInstantiateProductHandler postInstantiateProduct, ProductAddressableLoader.ProductLoadFailedHandler productLoadFailed)
    Parameters
    Type Name Description
    Int32 index

    The index.

    AssetProductReference prefab

    The prefab.

    ProductAddressableLoader.PostInstantiateProductHandler postInstantiateProduct

    The post instantiate product callback.

    ProductAddressableLoader.ProductLoadFailedHandler productLoadFailed

    The product load failed callback.

    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 © 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