Class ProductAddressableLoader
Loads products from addressables
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 |
|
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()