Class GroupOperation<TObject>
Class used to combine multiple operations into a single one.
Inheritance
Inherited Members
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
Key
Declaration
public override object Key { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Overrides
PercentComplete
Declaration
public override float PercentComplete { get; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
Methods
ResetStatus()
Declaration
public override void ResetStatus()
Overrides
SetResult(IList<TObject>)
Declaration
public override void SetResult(IList<TObject> result)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<TObject> | result |
Overrides
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 |