TaskExt.Loop Method

Loops iterating once per frame during a specified amount of time, executing a user-defined action.

Namespace: UltimateXR.Extensions.System.Threading
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static Task Loop(
	CancellationToken ct,
	float durationSeconds,
	Action<float> loopAction,
	UxrEasing easing = UxrEasing.Linear,
	bool forceLastT1 = false
)


Parameters

 

ct
Type: System.Threading.CancellationToken
The cancellation token
durationSeconds
Type: System.Single
Loop duration in seconds
loopAction
Type: System.Action(Single)
The action performed each frame, which will receive the interpolation [0.0, 1.0] parameter as argument.
easing (Optional)
Type: UltimateXR.Animation.Interpolation.UxrEasing
The easing used to compute the interpolation parameter over time
forceLastT1 (Optional)
Type: System.Boolean
Will enforce a last iteration with 1.0 interpolation parameter. This will avoid having a last step with close than, but not 1.0, interpolation.

Return Value

Type: Task
[Missing documentation for “M:UltimateXR.Extensions.System.Threading.TaskExt.Loop(System.Threading.CancellationToken,System.Single,System.Action{System.Single},UltimateXR.Animation.Interpolation.UxrEasing,System.Boolean)”]

See Also

Reference

TaskExt Class
UltimateXR.Extensions.System.Threading Namespace