Interface IAsyncOperation | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IAsyncOperation

    Base interface of all async ops

    Namespace: UnityEngine.ResourceManagement.AsyncOperations
    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

    true if is done; otherwise, false.

    IsValid

    used by Validate to ensure operation is in correct state

    Declaration
    bool IsValid { get; set; }
    Property Value
    Type Description
    System.Boolean

    Key

    Gets the key related to this operation, usually set to the address.

    Declaration
    object Key { get; set; }
    Property Value
    Type Description
    System.Object

    The context object.

    OperationException

    Gets the exception that caused this operation to change its status to Failure.

    Declaration
    Exception OperationException { get; }
    Property Value
    Type Description
    System.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

    Enum indicating success or failure of the operation.

    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()

    Retain()

    Internally marks operations to not automatically release back to the cache.

    Declaration
    IAsyncOperation Retain()
    Returns
    Type Description
    IAsyncOperation

    Passes back this

    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
    System.Action<IAsyncOperation>
    Back to top
    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