public sealed class AnimationStateOne state of a layer's graph: something to play, and the ways out of it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A state is a name, a Motion and a list of transitions — and the motion is why the type is this small. Whether the state plays one clip or a two-dimensional locomotion tree is the motion's business, so "idle" and "the whole of ground movement" are the same kind of thing and the graph does not grow a node type for each.
Fields and properties (6)
public string NameWhat it is called.
public Motion MotionWhat it plays.
public float SpeedHow fast, relative to the motion's own length. May be negative to play backwards.
public WrapMode WrapWhat happens when the motion reaches its end.
public IReadOnlyList<AnimationTransition> TransitionsThe ways out, tried in order.
public int IndexWhere this state sits in its machine, or −1 before it is added to one.
Methods (4)
public AnimationState(string name, Motion motion)Creates a state.
public AnimationState AddTransition(AnimationTransition transition)Adds a way out.
public AnimationTransition TransitionTo(AnimationState destination, float duration = 0.2)Adds a way out, and returns it so conditions can be added to it.
public override string ToString()Returns a string that represents the current object.
Used by (12)
- RigsVixen.Benchmarks.Animation
- AnimationStateMachineVixen.Animation
- AnimationTransitionVixen.Animation
- AnimatorTestsVixen.Animation.Tests
- ConstraintStageTestsVixen.Animation.Tests
- ConstraintTestsVixen.Animation.Tests
- EcsIntegrationTestsVixen.Animation.Tests
- NetworkAnimatorTestsVixen.Net.Animation.Tests
- StateMachineInstanceVixen.Animation
- StateMachineTestsVixen.Animation.Tests
- AnimationGraphCompilerVixen.Editor.AnimationGraph
- AnimationGraphTestsVixen.Editor.AnimationGraph.Tests