# AnimatorState

> States are the basic building blocks of a state machine. Each state contains a Motion ( AnimationClip or BlendTree) which will play while the character is in that state. When an event in the game triggers a state transition, the character will be left in a new state whose animation sequence will then take over.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Animations](/engine/6000.0/script-reference/unityeditor/animations.md)
* **Assembly:** UnityEditor
* **Inherits from:** [Object](/engine/6000.0/script-reference/unityengine/object.md)

```csharp
[HelpURL("class-State")]
public sealed class AnimatorState : Object
```

## Properties

| Property                                                                                                                         | Description                                                                                                          |
| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| [behaviours](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/behaviours.md)                                 | The Behaviour list assigned to this state.                                                                           |
| [cycleOffset](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/cycleoffset.md)                               | Offset at which the animation loop starts. Useful for synchronizing looped animations. Units is normalized time.     |
| [cycleOffsetParameter](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/cycleoffsetparameter.md)             | The animator controller parameter that drives the cycle offset value.                                                |
| [cycleOffsetParameterActive](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/cycleoffsetparameteractive.md) | Define if the /cycle offset/ value is driven by an Animator controller parameter or by the value set in the editor.  |
| [iKOnFeet](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/ikonfeet.md)                                     | Should Foot IK be respected for this state.                                                                          |
| [mirror](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/mirror.md)                                         | Whether the animation state is mirrored.                                                                             |
| [mirrorParameter](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/mirrorparameter.md)                       | The animator controller parameter that drives the mirror value.                                                      |
| [mirrorParameterActive](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/mirrorparameteractive.md)           | Define if the mirror value is driven by an Animator controller parameter or by the value set in the editor.          |
| [motion](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/motion.md)                                         | The motion assigned to this state.                                                                                   |
| [nameHash](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/namehash.md)                                     | The hashed name of the state.                                                                                        |
| [speed](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/speed.md)                                           | The default speed of the motion.                                                                                     |
| [speedParameter](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/speedparameter.md)                         | The animator controller parameter that drives the speed value.                                                       |
| [speedParameterActive](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/speedparameteractive.md)             | Define if the speed value is driven by an Animator controller parameter or by the value set in the editor.           |
| [tag](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/tag.md)                                               | A tag can be used to identify a state.                                                                               |
| [timeParameter](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/timeparameter.md)                           | If timeParameterActive is true, the value of this Parameter will be used instead of normalized time.                 |
| [timeParameterActive](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/timeparameteractive.md)               | If true, use value of given Parameter as normalized time.                                                            |
| [transitions](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/transitions.md)                               | The transitions that are going out of the state.                                                                     |
| [writeDefaultValues](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/writedefaultvalues.md)                 | Whether or not the AnimatorStates writes back the default values for properties that are not animated by its Motion. |

## Methods

| Method                                                                                                                       | Description                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [AddExitTransition](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/addexittransition.md)               | Utility function to add an outgoing transition to the exit of the state's parent state machine. |
| [AddStateMachineBehaviour](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/addstatemachinebehaviour.md) | Non-generic version of this method.                                                             |
| [AddTransition](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/addtransition.md)                       | Utility function to add an outgoing transition to the destination state.                        |
| [RemoveTransition](/engine/6000.0/script-reference/unityeditor/animations/animatorstate/removetransition.md)                 | Utility function to remove a transition from the state.                                         |

## Inheritance

**Inherited Members:**

* [Object.GetInstanceID()](/engine/6000.0/script-reference/unityengine/object/getinstanceid.md)
* [Object.GetHashCode()](/engine/6000.0/script-reference/unityengine/object/gethashcode.md)
* [Object.InstantiateAsync\<T>(T)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform, Vector3, Quaternion)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, CancellationToken)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, InstantiateParameters, CancellationToken)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, InstantiateParameters, CancellationToken)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, InstantiateParameters, CancellationToken)](/engine/6000.0/script-reference/unityengine/object/instantiateasync.md)
* [Object.Instantiate(Object, Vector3, Quaternion)](/engine/6000.0/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion\))
* [Object.Instantiate(Object, Vector3, Quaternion, Transform)](/engine/6000.0/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion-transform\))
* [Object.Instantiate(Object)](/engine/6000.0/script-reference/unityengine/object/instantiate.md#instantiate\(object\))
* [Object.Instantiate(Object, Scene)](/engine/6000.0/script-reference/unityengine/object/instantiate.md#instantiate\(object-scene\))
* [Object.Instantiate\<T>(T, InstantiateParameters)](/engine/6000.0/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, InstantiateParameters)](/engine/6000.0/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate(Object, Transform)](/engine/6000.0/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform\))
* [Object.Instantiate(Object, Transform, bool)](/engine/6000.0/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform-bool\))
* [Object.Instantiate\<T>(T)](/engine/6000.0/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion)](/engine/6000.0/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, Transform)](/engine/6000.0/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform)](/engine/6000.0/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform, bool)](/engine/6000.0/script-reference/unityengine/object/instantiate.md)
* [Object.Destroy(Object, float)](/engine/6000.0/script-reference/unityengine/object/destroy.md)
* [Object.DestroyImmediate(Object, bool)](/engine/6000.0/script-reference/unityengine/object/destroyimmediate.md)
* [Object.FindObjectsByType(Type, FindObjectsSortMode)](/engine/6000.0/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectssortmode\))
* [Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)](/engine/6000.0/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectsinactive-findobjectssortmode\))
* [Object.DontDestroyOnLoad(Object)](/engine/6000.0/script-reference/unityengine/object/dontdestroyonload.md)
* [Object.FindObjectsByType\<T>(FindObjectsSortMode)](/engine/6000.0/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectssortmode\))
* [Object.FindObjectsByType\<T>(FindObjectsInactive, FindObjectsSortMode)](/engine/6000.0/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectsinactive-findobjectssortmode\))
* [Object.FindFirstObjectByType\<T>()](/engine/6000.0/script-reference/unityengine/object/findfirstobjectbytype.md#findfirstobjectbytypet\(\))
* [Object.FindAnyObjectByType\<T>()](/engine/6000.0/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(\))
* [Object.FindFirstObjectByType\<T>(FindObjectsInactive)](/engine/6000.0/script-reference/unityengine/object/findfirstobjectbytype.md#findfirstobjectbytypet\(findobjectsinactive\))
* [Object.FindAnyObjectByType\<T>(FindObjectsInactive)](/engine/6000.0/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(findobjectsinactive\))
* [Object.FindFirstObjectByType(Type)](/engine/6000.0/script-reference/unityengine/object/findfirstobjectbytype.md#findfirstobjectbytype\(type\))
* [Object.FindAnyObjectByType(Type)](/engine/6000.0/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type\))
* [Object.FindFirstObjectByType(Type, FindObjectsInactive)](/engine/6000.0/script-reference/unityengine/object/findfirstobjectbytype.md#findfirstobjectbytype\(type-findobjectsinactive\))
* [Object.FindAnyObjectByType(Type, FindObjectsInactive)](/engine/6000.0/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type-findobjectsinactive\))
* [Object.ToString()](/engine/6000.0/script-reference/unityengine/object/tostring.md)
* [Object.name](/engine/6000.0/script-reference/unityengine/object/name.md)
* [Object.hideFlags](/engine/6000.0/script-reference/unityengine/object/hideflags.md)

### Operators

| Operator                                                                           | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.0/script-reference/unityengine/object/op-equality.md)   | Compares two object references to see if they refer to the same object. |
| [bool](/engine/6000.0/script-reference/unityengine/object/op-implicit.md)          | Determines whether the object exists.                                   |
| [operator !=](/engine/6000.0/script-reference/unityengine/object/op-inequality.md) | Compares if two objects refer to a different object.                    |
