ドキュメント

Unity Engine


Unity Engine


Animation state machine

Arrange animations into graphs to control action flow.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

It's common for a character or a GameObject to have several animations for the different actions it performs in a game. For example, a character might breath and sway slightly when idle, walk when commanded, and raise their arms when they fall from a platform. A sliding door might open, close, or jam.
Mecanim uses a state machine to arrange these actions. A state machine is a graph of nodes and connecting lines that resembles a flowchart. A state machine plays the animation linked to the current action and determines the next action. You can create a state machine for each character and GameObject in your scene.

Topic

Description

State machine basicsLearn core state machine concepts and build animation flow in the Animator window.
Animation statesConfigure states, motions, and defaults to control what each state plays.
Animation parametersControl state logic with scriptable parameters.
State machine transitionsSimplify complex controllers with Entry and Exit transitions between state machines.
Animation transitionsBlend between states and define when transitions are triggered.
Animation blend treesBlend similar motions smoothly using parameters and normalized time.
State machine behaviorsAttach behavior scripts to states to run code on enter, update, and exit.
Sub-state machinesGroup related states into nested machines to keep large graphs manageable.
Animation layersSeparate animation with layered controllers, masks, and blending modes.
State machine solo and mutePreview transitions faster by soloing key paths and muting irrelevant ones.
Target matchingMatch character parts to precise world targets during specific animation windows.

Additional resources