Interface IPreprocessingGenerationContext
Specialization of IGenerationContext with callbacks for (asynchronous) initialization prior to a Pipeline run.
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Library.Runtime.dll
Syntax
public interface IPreprocessingGenerationContext : IGenerationContext
Methods
GatherResourcesAsync(GenerationContext, IProgress<float>, CancellationToken)
Gathers the resources required for this context in order to be processed/used.
Declaration
UniTask<LoadResourceResult> GatherResourcesAsync(GenerationContext context, IProgress<float> onProgressUpdate = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
GenerationContext | context | Contains the immutable meta-information of a single update iteration. |
IProgress<float> | onProgressUpdate | The feedback function passing the (down)loading progress [0, 1]. |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
Cysharp.Threading.Tasks.UniTask<T><LoadResourceResult> |
ProcessAsync(GenerationContext, IProgress<float>, CancellationToken)
Preprocesses the context for the next update iteration.
Declaration
UniTask ProcessAsync(GenerationContext context, IProgress<float> onProgressUpdate = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
GenerationContext | context | Contains the immutable meta-information of a single update iteration. |
IProgress<float> | onProgressUpdate | Called with relative progress in [0, 1]. May be called from another thread. |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
Cysharp.Threading.Tasks.UniTask |