public sealed class AnimationStateMachineA layer's graph: the states, which one it starts in, and the transitions that can fire from anywhere.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The definition, not the playback. It is immutable once built and is shared by every character running it; where a particular character is in it lives in StateMachineInstance.
Any-state transitions are separate and are tried first. "Die from anywhere", "get hit from anywhere" — the alternative is the same transition copied onto forty states, which is forty places for it to be forgotten when a forty-first is added. They are tried before the current state's own, because a transition that is supposed to fire from anywhere is not supposed to lose to a local one.
No sub-state machines. They are a layout convenience in an editor and they change nothing about evaluation: a sub-machine's states are states, and its entry and exit nodes are transitions. The editor (Vixen.Editor.AnimationGraph, doc 14 Phase 8) is where the grouping belongs, and it flattens on the way out.
Fields and properties (4)
public ReadOnlySpan<AnimationState> StatesThe states, in the order they were given.
public int DefaultStateWhich state playback starts in.
public IReadOnlyList<AnimationTransition> AnyStateTransitionsTransitions that may fire whatever the current state is.
public AnimationState this[int index]A state by index.
Methods (3)
public AnimationStateMachine(IEnumerable<AnimationState> states, AnimationState? defaultState = null)Builds a machine from its states.
public AnimationTransition TransitionFromAnyState(AnimationState destination, float duration = 0.2)Adds a transition that may fire from any state.
public int IndexOf(string name)The index of a state by name, or −1.
Used by (8)
- AnimationLayerVixen.Animation
- AnimatorVixen.Animation
- AnimatorTestsVixen.Animation.Tests
- NetworkAnimatorTestsVixen.Net.Animation.Tests
- StateMachineInstanceVixen.Animation
- StateMachineTestsVixen.Animation.Tests
- AnimationGraphCompilerVixen.Editor.AnimationGraph
- AnimationGraphTestsVixen.Editor.AnimationGraph.Tests