Class AsyncOperationBase<TObject>
base class for implemented AsyncOperations, implements the needed interfaces and consolidates redundant code
Inherited Members
Namespace: UnityEngine .ResourceManagement .AsyncOperations
Assembly: Unity.ResourceManager.dll
Syntax
public abstract class AsyncOperationBase<TObject>
Type Parameters
Name | Description |
---|---|
TObject | The type of the operation. |
Constructors
Name | Description |
---|---|
Async |
Basic constructor for AsyncOperationBase. |
Fields
Name | Description |
---|---|
Has |
True, If the operation has been executed, else false |
Properties
Name | Description |
---|---|
Debug |
A custom operation should override this method to provide a debug friendly name for the operation. |
Is |
True if the current op has begun but hasn't yet reached completion. False otherwise. |
Progress | A custom operation should override this method to return the progress of the operation. |
Reference |
The number of references that are using this operation. When the ReferenceCount reaches 0, this operation is Destroyed. |
Result | Accessor to Result of the operation. |
Methods
Name | Description |
---|---|
Complete(TObject, bool, Exception, bool) | Complete the operation and invoke events. |
Complete(TObject, bool, string) | Complete the operation and invoke events. |
Complete(TObject, bool, string, bool) | Complete the operation and invoke events. |
Decrement |
Reduces the reference count for this operation by 1. If the reference count is reduced to 0, the operation is destroyed. |
Destroy() | This will be called by the resource manager when the reference count of the operation reaches zero. This method should not be called manually. A custom operation should override this method and release any held resources |
Execute() | This will be called by the resource manager after all dependent operation complete. This method should not be called manually. A custom operation should override this method and begin work when it is called. |
Get |
A custom operation should override this method to provide a list of AsyncOperationHandles that it depends on. |
Increment |
Increments the reference count for this operation. |
Invoke |
Used for the implementation of WaitForCompletion in an IAsyncOperation. |
To |
Converts the information about the operation to a formatted string. |
Wait |
Synchronously complete the async operation. |