Skip to main content

HandGestureDefinition

A class in Root.Township, the global namespace.

A hand gesture asset (such as pointing), matched to a transition on the hand animator. All of them are loaded from Resources/Gesture Definitions.

Constructors​

MemberWhat it is
HandGestureDefinition()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private HandFingers activeFingersBacking field for ActiveFingers, the fingers whose collisions turn on while the gesture is active.
private int animatorTransitionIndexBacking field for AnimatorTransitionIndex. Must match the transition number in the hand animator.
private static Dictionary<int, HandGestureDefinition> gestureForAnimationIndexBacking field for GestureForAnimationIndex, loaded from the "Gesture Definitions" resources on first use.

Properties​

MemberWhat it is
HandFingers ActiveFingers { get; }Fingers whose collisions are turned on while the gesture is active.
int AnimatorTransitionIndex { get; }Number of the hand animator transition this gesture uses.
static Dictionary<int, HandGestureDefinition> GestureForAnimationIndex { get; }Every gesture by animator transition index, loaded on first use.
static HandGestureDefinition NoGesture { get; }Always null, standing for no gesture.

Used in​

Members of other types that take, return or hold a HandGestureDefinition: