MixerParameterTweenFloat Class

Summary

A Animancer.MixerParameterTween`1 which uses UnityEngine.Mathf.LerpUnclamped(System.Single,System.Single,System.Single).
Assembly
Animancer.dll
Namespace
Animancer
Interfaces
Base Types
graph BT Type-->Base0["MixerParameterTween<float>"] Base0-->Base1["Key"] click Base1 "/animancer-v7-4/api/Animancer/Key" Base1-->Base2["Object"] Type-.->Interface0["IUpdatable"] click Interface0 "/animancer-v7-4/api/Animancer/IUpdatable" Type-.->Interface1["Key.IListItem"] click Interface1 "/animancer-v7-4/api/Animancer/IListItem" Type["MixerParameterTweenFloat"] class Type type-node

Syntax

public class MixerParameterTweenFloat : MixerParameterTween<float>, IUpdatable, Key.IListItem

Examples

[SerializeField] private AnimancerComponent _Animancer;
[SerializeField] private LinearMixerTransition _Mixer;

private MixerParameterTweenFloat _MixerTween;

private void Awake()
{
    // Play creates the LinearMixerState from the transition.
    _Animancer.Play(_Mixer);

    // Now that the state exists, we can create a tween for it.
    _MixerTween = new MixerParameterTweenFloat(_Mixer.State);

    // Start tweening the parameter towards 0.5 over a period of 0.25 seconds.
    _MixerTween.Start(0.5f, 0.25f);
}

Remarks

Documentation: Smoothing

Constructors

Fields

Name Constant Value Summary
NotInList -1
The Animancer.Key._Index which indicates that an item isn't in a list.
Inherited from Key
static

Methods

Name Value Summary
CalculateCurrentValue() float
Called every update while this tween is active to calculate the what value to set the Animancer.MixerState`1.Parameter to. Usually based on the Animancer.MixerParameterTween`1.StartValue, Animancer.MixerParameterTween`1.EndValue, and Animancer.MixerParameterTween`1.Progress.
IndexOf(Key) int
Returns location of this object in the list (or -1 if it is not currently in a keyed list).
Inherited from Key
static
IsInList(Key) bool
Is the `key` currently in a keyed list?
Inherited from Key
static