Class TweenableVariableSynchronousBase<T>
Synchronous implementation of tweenable variable used for types for which it may not be possible to create tween jobs.
Inheritance
BindableVariableBase<T>
BindableVariable<T>
TweenableVariableSynchronousBase<T>
Implements
IReadOnlyBindableVariable<T>
Inherited Members
BindableVariable<T>.ValueEquals(T)
BindableVariableBase<T>.Value
BindableVariableBase<T>.BindingCount
BindableVariableBase<T>.SetValueWithoutNotify(T)
BindableVariableBase<T>.BroadcastValue()
Namespace: UnityEngine.XR.Interaction.Toolkit.Utilities.Tweenables
Assembly: Unity.XR.Interaction.Toolkit.dll
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, float, bool)
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. |
float | tweenAmount | Value between 0-1 used in tween evaluation. |
bool | useCurve | Whether the animation curve should be used in the tween evaluation. |
Overrides
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 |
---|---|
bool | Returns true if the values are nearly equal. |
See Also
Lerp(T, T, float)
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. |
float | t | Value between 0-1 used to evaluate the output between the from and to values. |
Returns
Type | Description |
---|---|
T | Returns the interpolation from |
See Also
Implements
Unity.XR.CoreUtils.Bindings.Variables.IReadOnlyBindableVariable<T>