Expand description
Unity’s Animator side as typed data: an Avatar (the skeleton Mecanim animates, and for a humanoid the compiled
muscle axes and the HumanDescription it was built from), an AnimatorController (layers, state machines, states with
their blend trees and transitions, parameters). Nothing here is
evaluated: it is what the files hold, in Unity’s frame (rotations as [x, y, z, w]), with the names Unity keeps
only as CRC-32 hashes resolved through the object’s own name table (tos) where it has one.
Structs§
- Avatar
Axes - One bone’s muscle axes (
Axes): its pre- and post-rotation, the sign of each axis, the limits of its rotation in radians, its length and its type. - Avatar
Human - A humanoid’s compiled data (
Human): the human skeleton with its pose and axes, which skeleton bone each human bone is (bone_index,-1for none), the proportions the retargeting uses. - Avatar
Skeleton - A skeleton (
Skeleton): per node its parent (-1for a root) and its axes index (-1for none), the CRC-32 of each node’s path, and the axes the nodes index. - Blend
Node - One node of a blend tree (
BlendTreeNodeConstant): its kind (0 1D, 1 simple 2D, 2 freeform directional, 3 freeform cartesian, 4 direct, as Unity numbers them), the parameters it blends by, its children and thresholds or positions, and for a leaf the clip (clip: an index of the controller’s clips,u32::MAXfor none). - Condition
- A transition condition (
ConditionConstant): its mode (1 true, 2 false, 3 greater, 4 less, 6 equals, 7 not equal, as Unity numbers them), the CRC-32 of its parameter’s name, its threshold and, for an exit-time condition, the time. - Human
Bone - One human bone of the HumanDescription: the skeleton bone it names, the human bone it is and its stated limits.
- Human
Description - What the avatar was built from (
HumanDescription). - Layer
- A layer (
LayerConstant): the state machine it runs, the body and skeleton masks, how it blends in. - Parameter
- A controller parameter (
ValueConstant): the CRC-32 of its name, its kind (1 float, 3 int, 4 bool, 9 trigger, as Unity numbers them) and its place in the default values of that kind. - Selector
State - An entry or exit node of a state machine (
SelectorStateConstant). - Selector
Transition - A transition out of an entry or exit selector (
SelectorTransitionConstant). - Skeleton
Bone - One bone of the HumanDescription’s skeleton: its name, its parent’s, and its local transform.
- State
- A state (
StateConstant): its transitions, its blend trees (one per motion set; a plain clip is a tree of one leaf), the CRC-32 of its name and path and the parameters that drive its speed, mirror, offset and time. - State
Machine - A state machine (
StateMachineConstant). - Transition
- A transition (
TransitionConstant) of a state or from any state. - Unity
Animator Controller - An AnimatorController object as stored (the compiled
ControllerConstant). - Unity
Avatar - An Avatar object as stored: the skeleton Mecanim animates and, for a humanoid, its muscle axes.
- Xform
- A transform as Mecanim stores it (
xform): translation, rotation as a quaternion[x, y, z, w]and scale.
Constants§
- NO_
DESTINATION - What a selector transition’s stored
m_Destinationholds when it leads nowhere (0xFFFFFFFF, an invalid index):SelectorTransition::destinationisNonefor it. - SELECTOR_
BASE - What a destination at or above this is: a transition’s
destination(and a selector transition’s) below it names a state of its machine,SELECTOR_BASE + nthe selector noden(an entry or an exit).
Functions§
- name_
hash - The hash Unity’s Animator data names things by (a state, a layer, a parameter, a binding’s path): the CRC-32 (the zlib one) of the name’s bytes.