Animancer v6.0 is currently available for testing.

Float1ControllerState Class

Summary

[Pro-Only] A Animancer.ControllerState which manages one float parameter.
graph BT Type-->Base0["ControllerState"] click Base0 "/animancer/api/Animancer/ControllerState" Base0-->Base1["AnimancerState"] click Base1 "/animancer/api/Animancer/AnimancerState" Base1-->Base2["AnimancerNode"] click Base2 "/animancer/api/Animancer/AnimancerNode" Base2-->Base3["Key"] click Base3 "/animancer/api/Animancer/Key" Base3-->Base4["Object"] Type-.->Interface0["IKeyedListItem"] click Interface0 "/animancer/api/Animancer/IKeyedListItem" Type-.->Interface1["IEnumerable<AnimancerState>"] Type-.->Interface2["IEnumerator"] Type-.->Interface3["IPlayableWrapper"] click Interface3 "/animancer/api/Animancer/IPlayableWrapper" Type-.->Interface4["IAnimationClipCollection"] click Interface4 "/animancer/api/Animancer/IAnimationClipCollection" Type["Float1ControllerState"] class Type type-node

Syntax

public sealed class Float1ControllerState : ControllerState, IKeyedListItem, 
    IEnumerable<AnimancerState>, IEnumerator, IPlayableWrapper, IAnimationClipCollection

Remarks

Documentation: Animator Controllers

Constructors

Name Summary
Float1ControllerState(RuntimeAnimatorController, ControllerState.ParameterID, bool) Creates a new Animancer.Float1ControllerState to play the `controller`.

Properties

Name Value Summary
ApplyAnimatorIK bool
IK cannot be dynamically enabled on a Animancer.ControllerState.
Inherited from ControllerState
ApplyFootIK bool
[Animancer.IHasIK] Determines whether this node and its children are applying IK to the character's feet. The initial value is determined by Animancer.AnimancerPlayable.DefaultApplyFootIK.

This is equivalent to the "Foot IK" toggle in Animator Controller states.

Note that this property only applies to Animancer.ClipStates.
Inherited from AnimancerNode
AverageVelocity Vector3
The average velocity of the root motion caused by this state.
Inherited from AnimancerState
ChildCount int
[Animancer.IPlayableWrapper] The number of states using this node as their Animancer.AnimancerState.Parent.
Inherited from AnimancerNode
Clip AnimationClip
The UnityEngine.AnimationClip which this state plays (if any).
Inherited from AnimancerState
Controller RuntimeAnimatorController
The UnityEngine.RuntimeAnimatorController which this state plays.
Inherited from ControllerState
DefaultStateHashes int[]
The UnityEngine.AnimatorStateInfo.shortNameHash of the default state on each layer, used to reset to those states when Animancer.ControllerState.Stop is called if Animancer.ControllerState.KeepStateOnStop is true.
Inherited from ControllerState
Duration float
The number of seconds the animation will take to play fully at its current Animancer.AnimancerNode.Speed.
Inherited from AnimancerState
EditorName string
[Editor-Only] The Inspector display name of this node.
Inherited from AnimancerNode
EffectiveSpeed float
The Animancer.AnimancerNode.Speed of this node multiplied by the Animancer.AnimancerNode.Speed of each of its parents to determine the actual speed it's playing at.
Inherited from AnimancerNode
EffectiveWeight float
The Animancer.AnimancerNode.Weight of this state multiplied by the Animancer.AnimancerNode.Weight of each of its parents down the hierarchy to determine how much this state affects the final output.
Inherited from AnimancerState
EventPoolCapacity int
The capacity of the internal list in the Animancer.ObjectPool`1 for Animancer.AnimancerState.EventRunner.
Inherited from AnimancerState
static
EventPoolCount int
The number of spare items in the Animancer.ObjectPool`1 for Animancer.AnimancerState.EventRunner.
Inherited from AnimancerState
static
Events AnimancerEvent.Sequence
A list of Animancer.AnimancerEvents that will occur while this state plays as well as one that specifically defines when this state ends.

Accessing this property will acquire a spare Animancer.AnimancerEvent.Sequence from the Animancer.ObjectPool if none was already assigned. You can use Animancer.AnimancerState.HasEvents to check beforehand.

Animancer Lite does not allow the use of events in runtime builds, except for .
Inherited from AnimancerState
FadeSpeed float
The speed at which this node is fading towards the Animancer.AnimancerNode.TargetWeight.
Inherited from AnimancerNode
HasEvents bool
Indicates whether this state currently has an Animancer.AnimancerEvent.Sequence (since accessing the Animancer.AnimancerState.Events would automatically get one from the Animancer.ObjectPool).
Inherited from AnimancerState
Index int
The index of the port this node is connected to on the parent's UnityEngine.Playables.Playable.
Inherited from AnimancerNode
IsActive bool
Returns true if this state is playing and is at or fading towards a non-zero Animancer.AnimancerNode.Weight.
Inherited from AnimancerState
IsLooping bool
Indicates whether the current state on layer 0 will loop back to the start when it reaches the end.
Inherited from ControllerState
IsPlaying bool
Is the Animancer.AnimancerState.Time automatically advancing?
Inherited from AnimancerState
IsStopped bool
Returns true if this state is not playing and is at 0 Animancer.AnimancerNode.Weight.
Inherited from AnimancerState
IsValid bool
Indicates whether the Animancer.AnimancerNode._Playable is usable (properly initialised and not destroyed).
Inherited from AnimancerNode
KeepChildrenConnected bool
Indicates whether child playables should stay connected to this mixer at all times (default false).
Inherited from AnimancerNode
KeepStateOnStop bool
If false, Animancer.ControllerState.Stop will reset all layers to their default state. Default False.

The Animancer.ControllerState.DefaultStateHashes will only be gathered the first time this property is set to false or Animancer.ControllerState.GatherDefaultStates is called manually.
Inherited from ControllerState
Key Object
The object used to identify this state in the root Animancer.AnimancerPlayable.States dictionary. Can be null.
Inherited from AnimancerState
Layer AnimancerLayer
The root Animancer.AnimancerLayer which this node is connected to.
Inherited from AnimancerState
LayerIndex int
The index of the Animancer.AnimancerLayer this state is connected to (determined by the Animancer.AnimancerState.Parent).
Inherited from AnimancerState
Length float
The current UnityEngine.AnimatorStateInfo.length (on layer 0).
Inherited from ControllerState
MainObject Object
The UnityEngine.RuntimeAnimatorController which this state plays.
Inherited from ControllerState
NormalizedEndTime float
[Pro-Only] The Animancer.AnimancerState.NormalizedTime after which the Animancer.AnimancerEvent.Sequence.OnEnd callback will be invoked every frame.
Inherited from AnimancerState
NormalizedTime float
The Animancer.AnimancerState.Time of this state as a portion of the animation's Animancer.AnimancerState.Length, meaning the value goes from 0 to 1 as it plays from start to end, regardless of how long that actually takes.
Inherited from AnimancerState
Parameter float
Gets and sets a float parameter in the Animancer.ControllerState.Controller using the Animancer.Float1ControllerState.ParameterID as the id.
ParameterCount int
The number of parameters being wrapped by this state.
ParameterID ControllerState.ParameterID
The identifier of the parameter which Animancer.Float1ControllerState.Parameter will get and set.
Parent IPlayableWrapper
The object which receives the output of the UnityEngine.Playables.Playable.
Inherited from AnimancerState
Playable AnimatorControllerPlayable
The internal system which plays the UnityEngine.RuntimeAnimatorController.
Inherited from ControllerState
RawTime float
The UnityEngine.AnimatorStateInfo.normalizedTime * UnityEngine.AnimatorStateInfo.length of the Animancer.ControllerState.StateInfo.
Inherited from ControllerState
RemainingDuration float
The number of seconds the animation will take to reach the Animancer.AnimancerState.NormalizedEndTime at its current Animancer.AnimancerNode.Speed.
Inherited from AnimancerState
Root AnimancerPlayable
The Animancer.AnimancerPlayable at the root of the graph.
Inherited from AnimancerNode
Speed float
[Pro-Only] How fast the Animancer.AnimancerState.Time is advancing every frame.

1 is the normal speed.

A negative value will play the animation backwards.
Inherited from AnimancerNode
StateInfo AnimatorStateInfo
The current state on layer 0, or the next state if it is currently in a transition.
Inherited from ControllerState
TargetWeight float
The desired Animancer.AnimancerNode.Weight which this node is fading towards according to the Animancer.AnimancerNode.FadeSpeed.
Inherited from AnimancerNode
Time float
The number of seconds that have passed since the start of this animation.
Inherited from AnimancerState
Weight float
The current blend weight of this node which determines how much it affects the final output. 0 has no effect while 1 applies the full effect of this node and values inbetween apply a proportional effect.

Setting this property cancels any fade currently in progress. If you don't wish to do that, you can use Animancer.AnimancerNode.SetWeight(System.Single) instead.

Animancer Lite only allows this value to be set to 0 or 1 in runtime builds.
Inherited from AnimancerNode

Methods

Name Value Summary
AppendDescription(StringBuilder, int, string) void
Appends a detailed descrption of the current details of this node.
Inherited from AnimancerNode
AppendDetails(StringBuilder, string) void
Called by Animancer.AnimancerNode.AppendDescription(System.Text.StringBuilder,System.Int32,System.String) to append the details of this node.
Inherited from AnimancerState
CancelSetTime() void
Prevents the Animancer.AnimancerState.RawTime from being applied.
Inherited from AnimancerState
ChangeMainObject<T>(T, T) void
Sets the `currentObject` and calls Animancer.AnimancerNode.RecreatePlayable. If the `currentObject` was being used as the Animancer.AnimancerState.Key then it is changed as well.
Inherited from AnimancerState
CreatePlayable() void
Creates and assigns the UnityEngine.Playables.Playable managed by this state.
Inherited from AnimancerState
CreatePlayable(Playable) void
Creates and assigns the UnityEngine.Animations.AnimatorControllerPlayable managed by this state.
Inherited from ControllerState
Destroy() void
Destroys the UnityEngine.Playables.Playable and cleans up this state.
Inherited from ControllerState
DestroyPlayable() void
Destroys the UnityEngine.Playables.Playable.
Inherited from AnimancerNode
GatherAnimationClips(ICollection<AnimationClip>) void
[Animancer.IAnimationClipCollection] Gathers all the animations in this state.
Inherited from ControllerState
GatherDefaultStates() void
Gathers the Animancer.ControllerState.DefaultStateHashes from the current states.
Inherited from ControllerState
GetChild(int) AnimancerState
[Animancer.IPlayableWrapper] Returns the state connected to the specified `index` as a child of this node.
Inherited from AnimancerNode
GetDescription(int, string) string
Returns a detailed descrption of the current details of this node.
Inherited from AnimancerNode
GetEnumerator() IEnumerator<AnimancerState>
Gets an enumerator for all of this node's child states.
Inherited from AnimancerNode
GetParameterHash(int) int
Returns the hash of a parameter being wrapped by this state.
GetPath() string
Returns the hierarchy path of this state through its Animancer.AnimancerState.Parents.
Inherited from AnimancerState
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
OnAddChild(IList<AnimancerState>, AnimancerState) void
Connects the `state` to this node at its Animancer.AnimancerNode.Index.
Inherited from AnimancerNode
Play() void
Plays this state immediately, without any blending.
Inherited from AnimancerState
RecreatePlayable() void
Stores the values of all parameters, calls Animancer.AnimancerNode.DestroyPlayable, then restores the parameter values.
Inherited from ControllerState
RecreatePlayableRecursive() void
Calls Animancer.AnimancerNode.RecreatePlayable on this node and all its children recursively.
Inherited from AnimancerNode
RequireUpdate() void
Calls Animancer.AnimancerPlayable.RequireUpdate(Animancer.AnimancerNode) as long as the Animancer.AnimancerNode.Root is not null.
Inherited from AnimancerNode
ResetToDefaultStates() void
Resets all layers to their default state.
Inherited from ControllerState
SetEditorName(string) void
[Editor-Conditional] Sets the Inspector display name of this node. Animancer.AnimancerNode.ToString returns the name.
Inherited from AnimancerNode
SetMinEventPoolCount(int) void
If the Animancer.AnimancerState.EventPoolCount is less than the specified value, this method increases it to that value by creating new objects.
Inherited from AnimancerState
static
SetParent(AnimancerNode, int) void
Connects this state to the `parent` mixer at the specified `index`.
Inherited from AnimancerState
SetRoot(AnimancerPlayable) void
The Animancer.AnimancerPlayable at the root of the graph.
Inherited from AnimancerState
SetWeight(float) void
Sets the current blend weight of this node which determines how much it affects the final output. 0 has no effect while 1 applies the full effect of this node.

This method allows any fade currently in progress to continue. If you don't wish to do that, you can set the Animancer.AnimancerNode.Weight property instead.

Animancer Lite only allows this value to be set to 0 or 1 in runtime builds.
Inherited from AnimancerNode
StartFade(float, float) void
Calls Animancer.AnimancerNode.OnStartFade and starts fading the Animancer.AnimancerNode.Weight over the course of the `fadeDuration` (in seconds).

If the `targetWeight` is 0 then Animancer.AnimancerNode.Stop will be called when the fade is complete.

If the Animancer.AnimancerNode.Weight is already equal to the `targetWeight` then the fade will end immediately.

Animancer Lite only allows a `targetWeight` of 0 or 1 and the default `fadeDuration` (0.25 seconds) in runtime builds.
Inherited from AnimancerNode
Stop() void
Calls the base Animancer.AnimancerState.Stop and if Animancer.ControllerState.KeepStateOnStop is false it also calls Animancer.ControllerState.ResetToDefaultStates.
Inherited from ControllerState
ToString() string
Returns the Animancer.AnimancerNode.EditorName if one is set, otherwise a string describing the type of this state and the name of the Animancer.AnimancerState.MainObject.
Inherited from AnimancerState

Extension Methods

Name Value Summary
CalculateEditorFadeDuration(float) float
Returns the duration of the `node`s current fade (if any), otherwise returns the `defaultDuration`.
IsValid() bool
Returns true if the `node` is not null and Animancer.AnimancerNode.IsValid.

See Also

  • Animancer.Float2ControllerState
  • Animancer.Float3ControllerState