Interface IAsyncOperation
Base interface of all async ops
Namespace: UnityEngine.ResourceManagement
Syntax
public interface IAsyncOperation : IEnumerator
Properties
Context
Gets the context object related to this operation, usually set to the IResourceLocation.
Declaration
object Context { get; }
Property Value
| Type | Description |
|---|---|
| System.Object | The context object. |
IsDone
Gets a value indicating whether this ResourceManagement.IAsyncOperation is done.
Declaration
bool IsDone { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsValid
used by Validate to ensure operation is in correct state
Declaration
bool IsValid { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
OperationException
Gets the exception that caused this operation to change its status to Failure.
Declaration
Exception OperationException { get; }
Property Value
| Type | Description |
|---|---|
| Exception | The exception. |
PercentComplete
Gets the percent complete of this operation.
Declaration
float PercentComplete { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The percent complete. |
Result
Gets the result.
Declaration
object Result { get; }
Property Value
| Type | Description |
|---|---|
| System.Object | The result. |
Status
returns the status of the operation
Declaration
AsyncOperationStatus Status { get; }
Property Value
| Type | Description |
|---|---|
| AsyncOperationStatus |
|
Methods
Release()
Release operation back to internal cache. This can be used to avoid garbage collection.
Declaration
void Release()
ResetStatus()
Reset status and error
Declaration
void ResetStatus()
Validate()
internal integrity check
Declaration
bool Validate()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Events
Completed
Occurs when completed.
Declaration
event Action<IAsyncOperation> Completed
Event Type
| Type | Description |
|---|---|
| Action<IAsyncOperation> |