Class ChainOperation<TObject, TObjectDependency>
This class can be used to chain operations together in a dependency chain.
Inherited Members
Namespace: UnityEngine.ResourceManagement.AsyncOperations
Syntax
public class ChainOperation<TObject, TObjectDependency> : AsyncOperationBase<TObject>, IAsyncOperation<TObject>, IAsyncOperation, IEnumerator
Type Parameters
| Name | Description |
|---|---|
| TObject | The type of the operation. |
| TObjectDependency | The type parameter of the dependency IAsyncOperation. |
Properties
Key
Declaration
public override object Key { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object |
Overrides
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase<TObject>.Key
PercentComplete
Declaration
public override float PercentComplete { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Overrides
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase<TObject>.PercentComplete
Methods
Start(Object, Object, IAsyncOperation<TObjectDependency>, ChainOperation<TObject, TObjectDependency>.ChainCallbackDelegate, Boolean)
Start the operation.
Declaration
public virtual IAsyncOperation<TObject> Start(object context, object key, IAsyncOperation<TObjectDependency> dependency, ChainOperation<TObject, TObjectDependency>.ChainCallbackDelegate func, bool callbackOnFailedDependency = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | context | Context object. Usually set to the IResourceLocation. |
| System.Object | key | Key object. Usually set to the primary key or address. |
| IAsyncOperation<TObjectDependency> | dependency | The IAsyncOperation that must complete before invoking the Func that generates the dependent operation that will set the result of this operation. |
| ChainOperation.ChainCallbackDelegate<> | func | Function that takes as input the dependency operation and returns a new IAsyncOperation with the results needed by this operation. |
| System.Boolean | callbackOnFailedDependency |
Returns
| Type | Description |
|---|---|
| IAsyncOperation<TObject> |