docs.unity3d.com
    Show / Hide Table of Contents

    Class ProductSceneCacheLoader

    Loads product from a scene cache

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

    Fields

    ProductCache

    Products will be first loaded from the scene cache rather than from their addressable asset. This allows for faster editing workflows by not always having to save scene changes to product as they can still be used while in play mode.

    Declaration
    [SerializeField]
    [Tooltip("Products will be first loaded from the scene cache rather than from their addressable asset.")]
    public ProductCache ProductCache
    Field Value
    Type Description
    ProductCache

    Properties

    CacheRepository

    Gets the cache repository.

    Declaration
    public GameObject CacheRepository { get; }
    Property Value
    Type Description
    GameObject

    The cache repository.

    ShouldUnload

    Gets a value indicating whether [should unload].

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

    true if [should unload]; otherwise, false.

    Methods

    Load(Int32, ProductCacheItem, ProductAddressableLoader, Action<AsyncOperationHandle<GameObject>, GameObject, Boolean>)

    Loads the specified index.

    Declaration
    public AsyncOperationHandle<GameObject> Load(int index, ProductCacheItem cacheItem, ProductAddressableLoader addressableLoader, Action<AsyncOperationHandle<GameObject>, GameObject, bool> postInstantiateProduct)
    Parameters
    Type Name Description
    Int32 index

    The index.

    ProductCacheItem cacheItem

    The cache item.

    ProductAddressableLoader addressableLoader

    The addressable loader.

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

    The post instantiate product.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    AsyncOperationHandle<GameObject>.

    OnValidate()

    Called when [validate].

    Declaration
    public void OnValidate()

    PostUnload()

    Posts the unload.

    Declaration
    public void PostUnload()

    Unload(Product, AssetProductReference, ConfigurationManager)

    Unloads the specified product.

    Declaration
    public void Unload(Product product, AssetProductReference currentLoadableProductPrefab, ConfigurationManager configurationManager)
    Parameters
    Type Name Description
    Product product

    The product.

    AssetProductReference currentLoadableProductPrefab

    The current loadable product prefab.

    ConfigurationManager configurationManager

    The configuration manager.

    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