Animation: choose the tool
Clips, tracks, states and blending: the right tool for each task.
Choose a task
| Need | Tool and guide |
|---|---|
| Animate a property, play or pause a clip | AnimationPlayer |
| Call a hit method at a key, animate transforms or toggle visibility | Tracks and events |
| Blend poses, change states or overlay a one-shot action | AnimationTree |
| Assemble a character from separate 2D parts | Cutout animation |
| Deform a 2D polygon with bones | 2D skeletons |
| Play a video file | Videos |
| Record project frames | Creating movies |
Animation building blocks
Animation stores duration, tracks and keys. AnimationLibrary groups named clips. AnimationPlayer plays them and updates target properties. AnimationTree uses the same libraries for blending and state graphs.
AnimationPlayer and AnimationTree are entities in the game hierarchy. Resources named AnimationNode... are animation graph elements, not gameplay entities or ECS components. They describe pose processing; set instance parameters through the corresponding AnimationTree.
Give each property a consistent owner. A script writing Position every frame and an animation writing the same position compete according to update order. Let physics control a character body while animation controls its visual child. For clip-driven movement, extract root motion and explicitly pass it to physics.
Check the result
Start with one clip and one visible property. Check the library name, target path and keys before introducing blending. The following guides contain complete C# classes; code creates the cubes and resources without extra models or images.