Class TweenableVariableSynchronousBase<T>
Synchronous implementation of tweenable variable used for types for which it may not be possible to create tween jobs.
Inheritance
TweenableVariableSynchronousBase<T>
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Utilities.Tweenables
Syntax
public abstract class TweenableVariableSynchronousBase<T> : TweenableVariableBase<T>, IReadOnlyBindableVariable<T> where T : IEquatable<T>
Type Parameters
Name | Description |
---|---|
T | BindableVariable type. |
Methods
ExecuteTween(T, T, Single, Boolean)
Tween from current value to target using tween target.
Declaration
protected override void ExecuteTween(T startValue, T targetValue, float tweenAmount, bool useCurve = false)
Parameters
Type | Name | Description |
---|---|---|
T | startValue | Tween starting value. |
T | targetValue | Tween target value. |
Single | tweenAmount | Value between 0-1 used in tween evaluation. |
Boolean | useCurve | Whether the animation curve should be used in the tween evaluation. |
Overrides
UnityEngine.XR.Interaction.Toolkit.Utilities.Tweenables.TweenableVariableBase<T>.ExecuteTween(T, T, System.Single, System.Boolean)
See Also
IsNearlyEqual(T, T)
Evaluates if the value is nearly equal to target.
Declaration
protected abstract bool IsNearlyEqual(T startValue, T targetValue)
Parameters
Type | Name | Description |
---|---|---|
T | startValue | First value in equality comparison. |
T | targetValue | Second value in equality comparison. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the values are nearly equal. |
Lerp(T, T, Single)
Function used to interpolate between a tween's start value and target value.
Declaration
protected abstract T Lerp(T from, T to, float t)
Parameters
Type | Name | Description |
---|---|---|
T | from | Tween start value. |
T | to | Tween target value. |
Single | t | Value between 0-1 used to evaluate the output between the from and to values. |
Returns
Type | Description |
---|---|
T | Returns the interpolation from |