Class GroupOperation<TObject> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class GroupOperation<TObject>

    Class used to combine multiple operations into a single one.

    Inheritance
    System.Object
    AsyncOperationBase<System.Collections.Generic.IList<TObject>>
    GroupOperation<TObject>
    Inherited Members
    AsyncOperationBase<IList<TObject>>.m_Result
    AsyncOperationBase<IList<TObject>>.m_Status
    AsyncOperationBase<IList<TObject>>.m_Error
    AsyncOperationBase<IList<TObject>>.m_Context
    AsyncOperationBase<IList<TObject>>.m_Key
    AsyncOperationBase<IList<TObject>>.m_ReleaseToCacheOnCompletion
    AsyncOperationBase<IList<TObject>>.WaitHandle
    AsyncOperationBase<IList<TObject>>.IsValid
    AsyncOperationBase<IList<TObject>>.ToString()
    AsyncOperationBase<IList<TObject>>.Release()
    AsyncOperationBase<IList<TObject>>.Retain()
    AsyncOperationBase<IList<TObject>>.IAsyncOperation.Retain()
    AsyncOperationBase<IList<TObject>>.Validate()
    AsyncOperationBase<IList<TObject>>.Completed
    AsyncOperationBase<IList<TObject>>.IAsyncOperation.Completed
    AsyncOperationBase<IList<TObject>>.IAsyncOperation.Result
    AsyncOperationBase<IList<TObject>>.Status
    AsyncOperationBase<IList<TObject>>.OperationException
    AsyncOperationBase<IList<TObject>>.MoveNext()
    AsyncOperationBase<IList<TObject>>.Reset()
    AsyncOperationBase<IList<TObject>>.Current
    AsyncOperationBase<IList<TObject>>.Result
    AsyncOperationBase<IList<TObject>>.Context
    AsyncOperationBase<IList<TObject>>.InvokeCompletionEvent()
    Namespace: UnityEngine.ResourceManagement.AsyncOperations
    Syntax
    public class GroupOperation<TObject> : AsyncOperationBase<IList<TObject>>, IAsyncOperation<IList<TObject>>, IAsyncOperation, IEnumerator where TObject : class
    Type Parameters
    Name Description
    TObject

    Constructors

    GroupOperation()

    Construct a new GroupOperation.

    Declaration
    public GroupOperation()

    Properties

    IsDone

    Declaration
    public override bool IsDone { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase<System.Collections.Generic.IList<TObject>>.IsDone

    Key

    Declaration
    public override object Key { get; set; }
    Property Value
    Type Description
    System.Object
    Overrides
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase<System.Collections.Generic.IList<TObject>>.Key

    PercentComplete

    Declaration
    public override float PercentComplete { get; }
    Property Value
    Type Description
    System.Single
    Overrides
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase<System.Collections.Generic.IList<TObject>>.PercentComplete

    Methods

    ResetStatus()

    Declaration
    public override void ResetStatus()
    Overrides
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase<System.Collections.Generic.IList<TObject>>.ResetStatus()

    SetResult(IList<TObject>)

    Declaration
    public override void SetResult(IList<TObject> result)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<TObject> result
    Overrides
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase<System.Collections.Generic.IList<TObject>>.SetResult(System.Collections.Generic.IList<TObject>)

    Start(IList<IResourceLocation>, Action<IAsyncOperation<TObject>>, Func<IResourceLocation, IAsyncOperation<TObject>>)

    Load a list of assets associated with the provided IResourceLocations.

    Declaration
    public virtual IAsyncOperation<IList<TObject>> Start(IList<IResourceLocation> locations, Action<IAsyncOperation<TObject>> callback, Func<IResourceLocation, IAsyncOperation<TObject>> func)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<IResourceLocation> locations

    The list of locations.

    System.Action<IAsyncOperation<TObject>> callback

    Callback methods that will be called when each sub operation is complete. Order is not guaranteed.

    System.Func<IResourceLocation, IAsyncOperation<TObject>> func

    Function to generated each sub operation from the locations

    Returns
    Type Description
    IAsyncOperation<System.Collections.Generic.IList<TObject>>

    This object with the results being set to the results of the sub operations. The result will match the size and order of the locations list.

    Start(Object, Object, List<IAsyncOperation<TObject>>)

    Combines a set of IAsyncOperations into a single operation

    Declaration
    public virtual IAsyncOperation<IList<TObject>> Start(object context, object key, List<IAsyncOperation<TObject>> operations)
    Parameters
    Type Name Description
    System.Object context

    The context object.

    System.Object key

    The key object.

    System.Collections.Generic.List<IAsyncOperation<TObject>> operations

    The list of operations to wait on.

    Returns
    Type Description
    IAsyncOperation<System.Collections.Generic.IList<TObject>>

    Start<TParam>(IList<IResourceLocation>, Action<IAsyncOperation<TObject>>, Func<IResourceLocation, TParam, IAsyncOperation<TObject>>, TParam)

    Load a list of assets associated with the provided IResourceLocations.

    Declaration
    public virtual IAsyncOperation<IList<TObject>> Start<TParam>(IList<IResourceLocation> locations, Action<IAsyncOperation<TObject>> callback, Func<IResourceLocation, TParam, IAsyncOperation<TObject>> func, TParam funcParams)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<IResourceLocation> locations

    The list of locations.

    System.Action<IAsyncOperation<TObject>> callback

    Callback methods that will be called when each sub operation is complete. Order is not guaranteed.

    System.Func<IResourceLocation, TParam, IAsyncOperation<TObject>> func

    Function to generated each sub operation from the locations. This variation allows for a parameter to be passed to this method of type TParam.

    TParam funcParams

    The parameter objec to pass to the func.

    Returns
    Type Description
    IAsyncOperation<System.Collections.Generic.IList<TObject>>

    This object with the results being set to the results of the sub operations. The result will match the size and order of the locations list.

    Type Parameters
    Name Description
    TParam
    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