public sealed class AnimationParametersThe values a graph is driven by: what game code writes and what conditions and blend trees read.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Named to set up, indexed to use. Game code says parameters.SetFloat("Speed", v) once per frame and the string lookup does not matter; a state machine evaluating forty conditions per layer per frame cannot afford one, so a transition holds the index it resolved at build time. Both surfaces are here, and the indexed one is what the graph uses.
Triggers are consumed, not cleared on a timer. A trigger set by an input handler has to survive until the state machine next looks at it, and has to stop existing the moment a transition takes it — otherwise one button press fires the same transition again the next time the graph passes through that state. ConsumeTrigger is what a taken transition calls, and ClearTriggers at the end of an update is what stops an unconsumed one leaking into the next frame.
Setting a parameter that does not exist is ignored rather than throwing. A graph is content: it gets re-authored, and the game code that drove a parameter it no longer has is a thing to notice in an editor, not a crash in a build.
Fields and properties (1)
public int CountHow many parameters are declared.
Methods (25)
public int Declare(string name, AnimationParameterType type)Declares a parameter, or returns the index of one already declared.
public int IndexOf(string name)The index of a parameter, or −1 if there is none by that name.
public string NameOf(int index)What a parameter is called.
public AnimationParameterType TypeOf(int index)What a parameter holds.
public float GetFloat(int index)Reads a parameter as a number.
public int GetInt(int index)Reads a parameter as a whole number.
public bool GetBool(int index)Reads a parameter as a flag.
public float GetFloat(string name)Reads a parameter as a number, by name.
public int GetInt(string name)Reads a parameter as a whole number, by name.
public bool GetBool(string name)Reads a parameter as a flag, by name.
public void SetFloat(int index, float value)Writes a number.
public void SetInt(int index, int value)Writes a whole number.
public void SetBool(int index, bool value)Writes a flag.
public void SetFloat(string name, float value)Writes a number, by name. Declares the parameter if it does not exist.
public void SetInt(string name, int value)Writes a whole number, by name. Declares the parameter if it does not exist.
public void SetBool(string name, bool value)Writes a flag, by name. Declares the parameter if it does not exist.
public void SetTrigger(string name)Raises a trigger, to be consumed by the next transition that wants it.
public void SetSymbol(int index, Symbol value)Writes an interned word.
public void SetSymbol(string name, string? value)Writes an interned word, by name. Declares the parameter if it does not exist.
public Symbol GetSymbol(int index)Reads an interned word.
public Symbol GetSymbol(string name)Reads an interned word, by name.
public bool TryGetFacet(int index, out Facet facet)The facet a symbol parameter stands for: its name as the key, its value as the value.
public void ResetTrigger(string name)Clears a trigger by hand, for a jump that has been cancelled.
public bool ConsumeTrigger(int index)Takes a trigger, if it is raised.
public void ClearTriggers()Clears every trigger nothing consumed.
Used by (31)
- ConstraintStageBenchmarksVixen.Benchmarks.Animation
- CrowdBenchmarksVixen.Benchmarks.Animation
- RigsVixen.Benchmarks.Animation
- AnimationConditionVixen.Animation
- AnimationLayerVixen.Animation
- AnimationTransitionVixen.Animation
- AnimatorVixen.Animation
- AnimatorTestsVixen.Animation.Tests
- BlendEvaluatorVixen.Animation
- BlendTree1DVixen.Animation
- BlendTree2DVixen.Animation
- BlendTreeTestsVixen.Animation.Tests
- ClipMotionVixen.Animation
- MotionVixen.Animation
- MotionContextVixen.Animation
- MoveSetMotionVixen.Animation
- MoveSetTestsVixen.Animation.Tests
- MoveTransitionTestsVixen.Animation.Tests
- NetworkAnimatorApplySystemVixen.Net.Animation
- NetworkAnimatorCaptureSystemVixen.Net.Animation
- NetworkAnimatorTestsVixen.Net.Animation.Tests
- StateMachineInstanceVixen.Animation
- StateMachineTestsVixen.Animation.Tests
- StillVixen.Net.Animation.Tests
- StillTestMotionVixen.Animation.Tests
- UnresolvedMotionVixen.Animation
- AnimationGraphArtefactVixen.Editor.AnimationGraph
- AnimationGraphCompilerVixen.Editor.AnimationGraph
- AnimationGraphTestsVixen.Editor.AnimationGraph.Tests
- AnimationGraphViewVixen.Editor.AssetEditors
- EmptyMotionVixen.Editor.AnimationGraph