Documentation

Unity Spark

Open Unity Spark

Unity Spark

Animation Controller window reference

Find the controls in the Unity Spark Animation Controller window to set up the parameters, clips, layers, states, and transitions that drive a character's animations.
Read time 7 minutesLast updated 3 hours ago

Use the Animation Controller window to edit an animation controller, the asset that decides which animation a character plays and when it changes to another animation state. A controller holds parameters, clip slots, and layers. Each layer has states, which play animations, and transitions, which move between states. For the terms on this page, refer to Animation terms.

Open the Animation Controller window

To open the Animation Controller window, double-click an animation controller asset in the Project window.
To open the Animation Controller window from a window group:
  1. In any window group, select Add window (+).
  2. Under Animation, select Animation Controller.
The window shows its sections as forms, one under the other. Unity Spark saves each change as soon as you make it.

Rename a parameter, clip slot, layer, or state

To rename a parameter, clip slot, layer, or state:
  1. Select its name.
  2. Enter a new name.
  3. Press Enter.
Press Esc to cancel.

Controller picker

The button at the top of the window shows the name of the controller you're editing. Before you open a controller, it reads Select an Animation Controller….
The controller picker contains the following control.

Control

Description

Controller pickerLists the animation controllers in your project. Select one to edit it. If the project has none, the list reads
No Animation Controllers in this project.

Parameters

Parameters are named values, for example, a speed value or a jump trigger. Transition conditions and blend trees read them to decide which animation plays. The Parameters section contains the following controls.

Control

Description

Name fieldShows the parameter's name. Select it to rename the parameter.
TypeShows the parameter's type: Float, Bool, Trigger, or Int.
Default valueSets the parameter's starting value. A Float or Int parameter has a number field. A Bool parameter has a toggle. A Trigger parameter has no default value.
Remove parameter (trash)Removes the parameter.
Parameter nameSets the name of a new parameter.
Type listSets the type of the new parameter: Float, Bool, Trigger, or Int.
AddAdds the new parameter.

Clip Sources

Clip sources are the assets, such as character models, that the controller takes its animation clips from. If the controller has none, the section reads
No clip sources. Attach one to give this controller’s slots something to play.
The Clip Sources section contains the following controls.

Control

Description

Source nameShows the name of the attached asset.
Remove clip source (trash)Detaches the asset from the controller.
Add Clip SourceLists the assets you can attach. Select one to attach it. If none is available, the list reads
No assignable clip sources
.

Clip Slots

Clip slots are named places for animation clips, such as Idle or Run. States play a slot instead of a fixed clip, so each character that uses the controller can play its own clip in a slot. The picker on each slot sets the slot's shared default. Every character that uses the controller plays that clip unless the character overrides the slot.
Under the section heading, a status line reports whether Unity Spark can find the default clip of every slot. The Clip Slots section contains the following controls.

Control

Description

Name fieldShows the slot's name. Select it to rename the slot. If another slot already has the name, Unity Spark shows
A slot with that name already exists
and keeps the old name.
Remove slot (trash)Removes the slot.
File listSets the asset that holds the slot's default clip. None gives the slot no clip. Before you select an asset, the list reads No default (plays its own name). If you select an asset that's not a clip source yet, Unity Spark adds it to Clip Sources.
Animation listSets the clip in that asset to play by default.
Slot nameSets the name of a new slot.
AddAdds the new slot.

Layers

Layers let a character play more than one animation at once, for example, walking on one layer and waving on another. The layer you select also sets which states and transitions the window shows. To select a layer, select its name. The Layers section contains the following controls.

Control

Description

Name fieldShows the layer's name. Select it to select the layer, or to rename it.
Remove layer (trash)Removes the layer.
WeightSets how much the layer affects the character, from 0 to 1.
AdditiveDetermines whether this layer's animation adds on top of the layers under it. When disabled, the layer replaces them.
IK PassDetermines whether this layer runs an inverse kinematics (IK) pass.
MaskSets the avatar mask that limits the layer to part of the character. None applies the layer to the whole character.
Layer nameSets the name of a new layer.
Add LayerAdds the new layer. A new layer isn't additive.

States

The States: <layer> section lists the states of the selected layer. Each state plays one clip slot or a blend tree, which mixes several clips by parameter values. The section contains the following controls.

Control

Description

Name fieldShows the state's name. Select it to rename the state.
(default)Marks the state that the layer starts in.
Motion listSets what the state plays: Single Clip, 1D Blend Tree, or 2D Blend Tree.
Set DefaultMakes this state the one the layer starts in. Appears only on states that aren't the default.
Remove state (trash)Removes the state.
SpeedSets how fast the state plays. A value of 1 plays at the clip's original speed.
LoopDetermines whether the state's animation repeats.
Foot IKDetermines whether the state applies foot inverse kinematics (IK) while it plays.
State nameSets the name of a new state.
Slot listSets the clip slot the new state plays, or (no clip).
AddAdds the new state.

Blend tree settings

When a state plays a 1D Blend Tree or 2D Blend Tree, the state shows its blend tree settings.

Control

Description

Param XSets the parameter that blends the clips.
Param YSets the second parameter that blends the clips. Available only for a 2D Blend Tree.
ModeSets how a 2D Blend Tree blends: SimpleDirectional, FreeformDirectional, or FreeformCartesian.
Clip listSets the clip slot that each clip in the tree plays, or (clip) for none.
Position fieldsSets where the clip sits in the blend. A 1D Blend Tree has one threshold value. A 2D Blend Tree has an X and a Y position.
Remove blend child (trash)Removes the clip or nested tree from the blend tree.
+ ClipAdds a clip to the blend tree.
+ 1D TreeAdds a nested 1D blend tree.
+ 2D TreeAdds a nested 2D blend tree.
A nested blend tree shows its type and parameters, and lists its own clips with the same controls. To change a nested tree's parameters, remove it and add it again.

Transitions

The Transitions: <layer> section lists the transitions of the selected layer. Each row shows the state it starts from and the state it goes to, such as Any State → Run. Each transition contains the following controls.

Control

Description

durSets the cross-fade duration in seconds.
exitDetermines whether the transition waits for an exit time.
Exit time fieldSets when the transition can start, as a fraction of the state's length from 0 to 1. Appears only when you enable exit.
Condition listShows each condition as the parameter, the comparison, and the value.
Remove condition (trash)Removes the condition.
Parameter listSets the parameter a new condition checks. Appears only when the controller has parameters.
Comparison listSets how the condition compares the parameter: Greater, Less, Equals, NotEquals, If, or IfNot.
Value fieldSets the value the condition compares the parameter to.
Add condition (+)Adds the condition to the transition.
To add a transition, use the controls at the end of the section.

Control

Description

From listSets the state the transition starts from. Any State lets the transition start from any state in the layer.
To listSets the state the transition goes to.
AddAdds the transition, with a cross-fade duration of 0.2 s and no exit time.

Additional resources