Skip to main content

AnimatorForcerTool

A class in Root.Township, the global namespace.

Inspector debug tool that sets integer parameters on an animator and forces it into a named state.

Constructors​

MemberWhat it is
AnimatorForcerTool()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

6 private and internal fields
MemberWhat it is
private Animator animatorAnimator to force.
private bool btnApplyInspector button that calls Apply.
private int layerAnimator layer the state is on.
private string[] parameterNameInteger parameter names, paired by index with parameterValue.
private int[] parameterValueValues set on the matching parameters.
private string stateNameState to play.

Methods​

1 private and internal method
MemberWhat it is
private void Apply()Sets each listed integer parameter, plays the state from the start on the layer, then advances the animator one second.