docs.unity3d.com
    Show / Hide Table of Contents

    Class TweenableVariableSynchronousBase<T>

    Synchronous implementation of tweenable variable used for types for which it may not be possible to create tween jobs.

    Inheritance
    Object
    BindableVariableBase<T>
    BindableVariable<T>
    TweenableVariableBase<T>
    TweenableVariableSynchronousBase<T>
    QuaternionTweenableVariable
    Inherited Members
    TweenableVariableBase<T>.k_NearlyOne
    TweenableVariableBase<T>.animationCurve
    TweenableVariableBase<T>.target
    TweenableVariableBase<T>.initialValue
    TweenableVariableBase<T>.HandleTween(Single)
    TweenableVariableBase<T>.StartAutoTween(Single)
    TweenableVariableBase<T>.PlaySequence(T, T, Single, Action)
    TweenableVariableBase<T>.OnAnimationCurveChanged(AnimationCurve)
    TweenableVariableBase<T>.OnTargetChanged(T)
    TweenableVariableBase<T>.PreprocessTween()
    BindableVariable<T>.ValueEquals(T)
    BindableVariableBase<T>.SetValueWithoutNotify(T)
    BindableVariableBase<T>.Subscribe(Action<T>)
    BindableVariableBase<T>.SubscribeAndUpdate(Action<T>)
    BindableVariableBase<T>.Unsubscribe(Action<T>)
    BindableVariableBase<T>.BroadcastValue()
    BindableVariableBase<T>.Task(Func<T, Boolean>, CancellationToken)
    BindableVariableBase<T>.Task(T, CancellationToken)
    BindableVariableBase<T>.Value
    BindableVariableBase<T>.BindingCount
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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
    HandleTween(Single)

    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 from to to.

    See Also

    TweenableVariableAsyncBase<T>
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023