Struct ProvideHandle
Container for all data need by providers to fulfill requests.
Namespace: UnityEngine.ResourceManagement.ResourceProviders
Syntax
public struct ProvideHandle
Properties
DependencyCount
Number of dependencies.
Declaration
public int DependencyCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Location
The location for the request.
Declaration
public IResourceLocation Location { get; }
Property Value
| Type | Description |
|---|---|
| IResourceLocation |
ResourceManager
The ResourceManager used to create the operation.
Declaration
public ResourceManager ResourceManager { get; }
Property Value
| Type | Description |
|---|---|
| ResourceManager |
Type
The requested object type.
Declaration
public Type Type { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Methods
Complete<T>(T, Boolean, Exception)
Called to complete the operation.
Declaration
public void Complete<T>(T result, bool status, Exception exception)
Parameters
| Type | Name | Description |
|---|---|---|
| T | result | The result object. |
| Boolean | status | True if the operation was successful, false otherwise. |
| Exception | exception | The exception if the operation failed. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of object requested. |
GetDependencies(IList<Object>)
Get the depedency objects.
Declaration
public void GetDependencies(IList<object> list)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<Object> | list | The list of dependecies to fill in. |
GetDependency<TDepObject>(Int32)
Get a specific dependency object.
Declaration
public TDepObject GetDependency<TDepObject>(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index | The index of the dependency. |
Returns
| Type | Description |
|---|---|
| TDepObject | The dependency object. |
Type Parameters
| Name | Description |
|---|---|
| TDepObject | The dependency type. |
SetDownloadProgressCallbacks(Func<DownloadStatus>)
Set the func for handling download progress requests.
Declaration
public void SetDownloadProgressCallbacks(Func<DownloadStatus> callback)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<DownloadStatus> | callback | The callback function. |
SetProgressCallback(Func<Single>)
Set the func for handling progress requests.
Declaration
public void SetProgressCallback(Func<float> callback)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Single> | callback | The callback function. |
SetWaitForCompletionCallback(Func<Boolean>)
Set the func for handling a request to wait for the completion of the operation
Declaration
public void SetWaitForCompletionCallback(Func<bool> callback)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Boolean> | callback | The callback function. |