Class ChainOperation<TObject, TObjectDependency> | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class ChainOperation<TObject, TObjectDependency>

    This class can be used to chain operations together in a dependency chain.

    Inheritance
    System.Object
    AsyncOperationBase<TObject>
    ChainOperation<TObject, TObjectDependency>
    Inherited Members
    AsyncOperationBase<TObject>.m_Result
    AsyncOperationBase<TObject>.m_Status
    AsyncOperationBase<TObject>.m_Error
    AsyncOperationBase<TObject>.m_Context
    AsyncOperationBase<TObject>.m_Key
    AsyncOperationBase<TObject>.m_ReleaseToCacheOnCompletion
    AsyncOperationBase<TObject>.WaitHandle
    AsyncOperationBase<TObject>.IsValid
    AsyncOperationBase<TObject>.ToString()
    AsyncOperationBase<TObject>.Release()
    AsyncOperationBase<TObject>.Retain()
    AsyncOperationBase<TObject>.IAsyncOperation.Retain()
    AsyncOperationBase<TObject>.ResetStatus()
    AsyncOperationBase<TObject>.Validate()
    AsyncOperationBase<TObject>.Completed
    AsyncOperationBase<TObject>.IAsyncOperation.Completed
    AsyncOperationBase<TObject>.IAsyncOperation.Result
    AsyncOperationBase<TObject>.Status
    AsyncOperationBase<TObject>.OperationException
    AsyncOperationBase<TObject>.MoveNext()
    AsyncOperationBase<TObject>.Reset()
    AsyncOperationBase<TObject>.Current
    AsyncOperationBase<TObject>.Result
    AsyncOperationBase<TObject>.IsDone
    AsyncOperationBase<TObject>.Context
    AsyncOperationBase<TObject>.InvokeCompletionEvent()
    AsyncOperationBase<TObject>.SetResult(TObject)
    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>
    Back to top Copyright © 2015-2018 Unity
    Generated by DocFX