Class FrameBudgetTask
Provides frame budget observing tasks.
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Library.Runtime.dll
Syntax
public static class FrameBudgetTask
Properties
FrameBudget
Gets or sets the global, shared frame budget for tasks that may run over several frames. Used to wait for the next frame if the budget is exceeded, otherwise continue synchronously by using the tasks returned from NextFrameIfNecessary(CancellationToken).
Declaration
public static TimeSpan FrameBudget { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
NextFrameIfNecessary(CancellationToken)
Returns a task that completes synchronously if there is still some frame budget remaining, otherwise a task that delays execution to the next frame, in the same way Cysharp.Threading.Tasks.UniTask.NextFrame does.
Declaration
public static UniTask NextFrameIfNecessary(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
Cysharp.Threading.Tasks.UniTask |