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
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver
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(Single)
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 |
---|---|---|
Single | tweenTarget | Tween interpolation target based on delta time parameter. |
Implements
Interpolate(T, T, Single)
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. |
Single | 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 |