Class BaseSynchronousAffordanceStateReceiver<T>
Base implementation of a synchronous affordance state receiver to be used with affordance types that might not be possible to tween using the job system.
Inheritance
BaseSynchronousAffordanceStateReceiver<T>
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public abstract class BaseSynchronousAffordanceStateReceiver<T> : BaseAffordanceStateReceiver<T>, IAffordanceStateReceiver<T>, ISynchronousAffordanceStateReceiver, IAffordanceStateReceiver where T : struct, IEquatable<T>
Type Parameters
Name | Description |
---|---|
T | The type of the value struct. |
Methods
HandleTween(float)
Compute new tween target using theme data and consume it inline to update listeners with new affordance value.
Declaration
public virtual void HandleTween(float tweenTarget)
Parameters
Type | Name | Description |
---|---|---|
float | tweenTarget | Tween interpolation target based on delta time parameter. |
See Also
Interpolate(T, T, float)
Function used to interpolate between a tween's start value and target value.
Declaration
protected abstract T Interpolate(T startValue, T targetValue, float interpolationAmount)
Parameters
Type | Name | Description |
---|---|---|
T | startValue | Tween start value. |
T | targetValue | Tween target value. |
float | interpolationAmount | Interpolation parameter value between 0-1 used to evaluate the output between the start and target values. |
Returns
Type | Description |
---|---|
T | Returns the interpolation from |