Animator Inherits from Behaviour

Interface to control the Mecanim animation system.

Variables
isHuman

Returns true if the current rig is humanoid, false if it is generic.

humanScale

Returns the scale of the current Avatar for a humanoid rig, (1 by default if the rig is generic).

deltaPosition

Gets the avatar delta position for the last evaluated frame.

deltaRotation

Gets the avatar delta rotation for the last evaluated frame.

rootPosition

The root position, the position of the game object.

rootRotation

The root rotation, the rotation of the game object.

applyRootMotion

Root is controlled by animations.

animatePhysics

When turned on, animations will be executed in the physics loop. This is only useful in conjunction with kinematic rigidbodies.

gravityWeight

The current gravity weight based on current animations that are played.

bodyPosition

The position of the body center of mass.

bodyRotation

The rotation of the body center of mass.

stabilizeFeet

Automatic stabilization of feet during transition and blending.

layerCount

The AnimatorController layer count.

feetPivotActive

Blends pivot point between body center of mass and feet pivot. At 0%, the blending point is body center of mass. At 100%, the blending point is feet pivot.

pivotWeight

Gets the pivot weight.

pivotPosition

Get the current position of the pivot.

isMatchingTarget

If automatic matching is active.

speed

The playback speed of the Animator. 1 is normal playback speed.

targetPosition

Returns the position of the target specified by SetTarget(AvatarTarget targetIndex, float targetNormalizedTime)).

targetRotation

Returns the rotation of the target specified by SetTarget(AvatarTarget targetIndex, float targetNormalizedTime)).

cullingMode

Controls culling of this Animator component.

playbackTime

Sets the playback position in the recording buffer.

recorderStartTime

Start time of the first frame of the buffer relative to the frame at which StartRecording was called.

recorderStopTime

End time of the recorded clip relative to when StartRecording was called.

runtimeAnimatorController

The runtime representation of AnimatorController that controls the Animator.

avatar

Gets/Sets the current Avatar.

layersAffectMassCenter

Internal.

leftFeetBottomHeight

Get left foot bottom height.

rightFeetBottomHeight

Get right foot bottom height.

logWarnings

Functions
GetFloat

Gets the value of a float parameter.

SetFloat

Sets the value of a float parameter.

GetBool

Gets the value of a bool parameter.

SetBool

Sets the value of a bool parameter.

GetInteger

Gets the value of an integer parameter.

SetInteger

Sets the value of an integer parameter.

GetVector

Gets the value of a vector parameter.

SetVector

Sets the value of a vector parameter.

GetQuaternion

Gets the value of a quaternion parameter.

SetQuaternion

Sets the value of a quaternion parameter.

IsParameterControlledByCurve

Returns true if a parameter is controlled by an additional curve on an animation.

GetIKPosition

Gets the position of an IK goal.

SetIKPosition

Sets the position of an IK goal.

GetIKRotation

Gets the rotation of an IK goal.

SetIKRotation

Sets the rotation of an IK goal.

GetIKPositionWeight

Gets the translative weight of an IK goal (0 = at the original animation before IK, 1 = at the goal).

SetIKPositionWeight

Sets the translative weight of an IK goal (0 = at the original animation before IK, 1 = at the goal).

GetIKRotationWeight

Gets the rotational weight of an IK goal (0 = rotation before IK, 1 = rotation at the IK goal).

SetIKRotationWeight

Sets the rotational weight of an IK goal (0 = rotation before IK, 1 = rotation at the IK goal).

SetLookAtPosition

Sets the look at position.

SetLookAtWeight

Set look at weights.

GetLayerName

Gets name of the layer.

GetLayerWeight

Gets the layer's current weight.

SetLayerWeight

Sets the layer's current weight.

GetCurrentAnimatorStateInfo

Gets the current State information on a specified AnimatorController layer.

GetNextAnimatorStateInfo

Gets the next State information on a specified AnimatorController layer.

GetAnimatorTransitionInfo

Gets the Transition information on a specified AnimatorController layer.

GetCurrentAnimationClipState

Gets the list of AnimationInfo currently played by the current state.

GetNextAnimationClipState

Gets the list of AnimationInfo currently played by the next state.

IsInTransition

Is the specified AnimatorController layer in a transition.

MatchTarget

Automatically adjust the gameobject position and rotation so that the AvatarTarget reaches the matchPosition when the current state is at the specified progress.

InterruptMatchTarget

Interrupts the automatic target matching.

ForceStateNormalizedTime

Force the normalized time of a state to a user defined value.

SetTarget

Sets an AvatarTarget and a targetNormalizedTime for the current state.

IsControlled

Returns true if the transform is controlled by the Animator\.

GetBoneTransform

Returns transform mapped to this human bone id.

StartPlayback

Sets the animator in playback mode.

StopPlayback

Stops the animator playback mode. When playback stops, the avatar resumes getting control from game logic.

StartRecording

Sets the animator in recording mode, and allocates a circular buffer of size frameCount.

StopRecording

Stops animator record mode.

Class Functions
StringToHash

Generates an parameter id from a string.

Inherited members
Inherited Variables
enabled

Enabled Behaviours are Updated, disabled Behaviours are not.

rigidbody

The Rigidbody attached to this GameObject (null if there is none attached).

camera

The Camera attached to this GameObject (null if there is none attached).

light

The Light attached to this GameObject (null if there is none attached).

animation

The Animation attached to this GameObject (null if there is none attached).

constantForce

The ConstantForce attached to this GameObject (null if there is none attached).

renderer

The Renderer attached to this GameObject (null if there is none attached).

audio

The AudioSource attached to this GameObject (null if there is none attached).

guiText

The GUIText attached to this GameObject (null if there is none attached).

networkView

The NetworkView attached to this GameObject (Read Only). (null if there is none attached).

guiTexture

The GUITexture attached to this GameObject (Read Only). (null if there is none attached).

collider

The Collider attached to this GameObject (null if there is none attached).

hingeJoint

The HingeJoint attached to this GameObject (null if there is none attached).

particleEmitter

The ParticleEmitter attached to this GameObject (null if there is none attached).

particleSystem

The ParticleSystem attached to this GameObject (null if there is none attached).

tag

The tag of this game object.

name

The name of the object.

hideFlags

Should the object be hidden, saved with the scene or modifiable by the user?

Inherited Functions
GetComponent

Returns the component of Type type if the game object has one attached, null if it doesn't.

GetComponentInChildren

Returns the component of Type type in the GameObject or any of its children using depth first search.

GetComponentsInChildren

Returns all components of Type type in the GameObject or any of its children.

GetComponents

Returns all components of Type type in the GameObject.

CompareTag

Is this game object tagged tag?

SendMessageUpwards

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

SendMessage

Calls the method named methodName on every MonoBehaviour in this game object.

BroadcastMessage

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

GetInstanceID

Returns the instance id of the object.

ToString

Returns the name of the game object.

Inherited Class Functions
operator bool

Instantiate

Clones the object original and returns the clone.

Destroy

Removes a gameobject, component or asset.

DestroyImmediate

Destroys the object obj immediately. It is strongly recommended to use Destroy instead.

FindObjectsOfType

Returns a list of all active loaded objects of Type type.

FindObjectOfType

Returns the first active loaded object of Type type.

operator ==

Compares if two objects refer to the same.

operator !=

Compares if two objects refer to a different object.

DontDestroyOnLoad

Makes the object target not be destroyed automatically when loading a new scene.