docs.unity3d.com
    Show / Hide Table of Contents

    Class ProductRepository

    Handles product load and unload

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

    Constructors

    ProductRepository()

    Initializes a new instance of the ProductRepository class.

    Declaration
    public ProductRepository()

    Fields

    OnProductLoaded

    The on product loaded

    Declaration
    public Action OnProductLoaded
    Field Value
    Type Description
    Action

    Properties

    addressableLoader

    Gets the addressable loader.

    Declaration
    public ProductAddressableLoader addressableLoader { get; }
    Property Value
    Type Description
    ProductAddressableLoader

    The addressable loader.

    currentProduct

    Current product.

    Declaration
    public Product currentProduct { get; }
    Property Value
    Type Description
    Product

    The current product.

    currentProductIndex

    Gets the index of the current product.

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

    The index of the current product.

    CurrentProductReference

    Gets the current product reference.

    Declaration
    public AssetProductReference CurrentProductReference { get; }
    Property Value
    Type Description
    AssetProductReference

    The current product reference.

    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.

    sceneCacheLoader

    Gets the scene cache loader.

    Declaration
    public ProductSceneCacheLoader sceneCacheLoader { get; }
    Property Value
    Type Description
    ProductSceneCacheLoader

    The scene cache loader.

    Methods

    IsValidProductAsset(Configurator, Int32)

    Determines whether [is valid product asset] [the specified configurator].

    Declaration
    public static bool IsValidProductAsset(Configurator configurator, int productIndex)
    Parameters
    Type Name Description
    Configurator configurator

    The configurator.

    Int32 productIndex

    Index of the product.

    Returns
    Type Description
    Boolean

    true if [is valid product asset] [the specified configurator]; otherwise, false.

    IsValidProductAsset(AssetProductReference)

    Determines whether [is valid product asset] [the specified loadable product asset].

    Declaration
    public static bool IsValidProductAsset(AssetProductReference loadableProductAsset)
    Parameters
    Type Name Description
    AssetProductReference loadableProductAsset

    The loadable product asset.

    Returns
    Type Description
    Boolean

    true if [is valid product asset] [the specified loadable product asset]; otherwise, false.

    LoadProduct(Int32, Configurator)

    Loads the product.

    Declaration
    public AsyncOperationHandle<GameObject> LoadProduct(int index, Configurator configurator)
    Parameters
    Type Name Description
    Int32 index

    The index.

    Configurator configurator

    The configurator.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    AsyncOperationHandle<GameObject>.

    ResetProductPosition()

    Resets the product position.

    Declaration
    public void ResetProductPosition()

    UnloadCurrentProduct(ConfigurationManager)

    Unloads the current product.

    Declaration
    public void UnloadCurrentProduct(ConfigurationManager configurationManager)
    Parameters
    Type Name Description
    ConfigurationManager configurationManager

    The configuration manager.

    UnloadCurrentProductCompletely()

    Unloads the current product completely.

    Declaration
    public void UnloadCurrentProductCompletely()

    Events

    anyProductChanged

    Occurs when [any product changed].

    Declaration
    public static event ProductChangedHandler anyProductChanged
    Event Type
    Type Description
    ProductChangedHandler

    productChanged

    Raised when the product has changed (loaded or unloaded).

    Declaration
    public event ProductChangedHandler productChanged
    Event Type
    Type Description
    ProductChangedHandler
    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