docs.unity3d.com
    Show / Hide Table of Contents

    Class AsyncOperationBase<TObject>

    base class for implemented AsyncOperations, implements the needed interfaces and consolidates redundant code

    Inheritance
    Object
    AsyncOperationBase<TObject>
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.ResourceManagement.AsyncOperations
    Syntax
    public abstract class AsyncOperationBase<TObject> : IAsyncOperation
    Type Parameters
    Name Description
    TObject

    The type of the operation.

    Constructors

    Name Description
    AsyncOperationBase()

    Basic constructor for AsyncOperationBase.

    Fields

    Name Description
    HasExecuted

    True, If the operation has been executed, else false

    Properties

    Name Description
    DebugName

    A custom operation should override this method to provide a debug friendly name for the operation.

    IsRunning

    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.

    ReferenceCount

    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, Boolean, Exception, Boolean)

    Complete the operation and invoke events.

    Complete(TObject, Boolean, String)

    Complete the operation and invoke events.

    Complete(TObject, Boolean, String, Boolean)

    Complete the operation and invoke events.

    DecrementReferenceCount()

    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.

    GetDependencies(List<AsyncOperationHandle>)

    A custom operation should override this method to provide a list of AsyncOperationHandles that it depends on.

    IncrementReferenceCount()

    Increments the reference count for this operation.

    InvokeWaitForCompletion()

    Used for the implementation of WaitForCompletion in an IAsyncOperation.

    ToString()

    Converts the information about the operation to a formatted string.

    WaitForCompletion()

    Synchronously complete the async operation.

    Back to top
    Terms of use
    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