Animancer v6.0 is currently available for testing.

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/api/Animancer/Key" Base1-->Base2["Object"] Type-.->Interface0["IUpdatable"] click Interface0 "/animancer/api/Animancer/IUpdatable" Type-.->Interface1["IKeyedListItem"] click Interface1 "/animancer/api/Animancer/IKeyedListItem" Type["MixerParameterTweenFloat"] class Type type-node

Syntax

public class MixerParameterTweenFloat : MixerParameterTween<float>, IUpdatable, IKeyedListItem

Examples

[SerializeField] private AnimancerComponent _Animancer;
[SerializeField] private LinearMixerState.Transition _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);
}

Constructors

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
Indicates whether the specified object is currently in a keyed list.
Inherited from Key
static