← All docs

Animation

Claunity can create and configure Unity AnimatorControllers — adding states, transitions, parameters, and wiring animation clips. It can also read the current structure of any controller to understand what's there before making changes.


Animator Controller

Create a controller

"Create an AnimatorController called "PlayerAnimator" in Assets/Animations"

Add a parameter

"Add a Float parameter called "Speed" to the PlayerAnimator controller"

Add a state

"Add an "Idle" state to PlayerAnimator using the Idle.anim clip, and make it the default state"

Add a transition

"Add a transition from Idle to Walk in PlayerAnimator that triggers when Speed is greater than 0.1"

Read controller structure

"What states and transitions does the PlayerAnimator have?"

Full setups

Complete character animator

"Set up a PlayerAnimator with Idle, Walk, and Jump states. Use a Speed float to transition between Idle and Walk, and a Jump trigger for jumping"

Enemy animator

"Create an EnemyAnimator with Idle, Walk, Attack, and Death states, with appropriate transitions based on IsAttacking bool and IsDead bool parameters"


Parameter types

When adding parameters to an Animator, you can use: Float, Int, Bool, and Trigger. Just mention the type in your request and Claunity picks the right one.

Tips

Specify animation clip paths

If you have animation clips in your project, mention their names so Claunity can assign them to the correct states.

Add a Run state to PlayerAnimator using the clip at Assets/Animations/Player_Run.anim