- Home
- Skills
- Besty0728
- Unity Skills
- Animator
animator_skill
- C#
44
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill besty0728/unity-skills --skill animator- SKILL.md5.3 KB
Overview
This skill provides programmatic control over Unity Animator Controllers: create controllers, add and list parameters, assign controllers to GameObjects, and drive playback at runtime. It streamlines common animation setup tasks and runtime parameter updates so you can automate character and object animation workflows. Use it to build, inspect, and control Animator assets without manual editor steps.
How this skill works
The skill exposes discrete operations to create Animator Controller assets, add parameters of types (float, int, bool, trigger), and list or inspect controller contents. At runtime you can set parameters on an Animator component, play specific states, and assign controllers to GameObjects. It returns structured results for queries (parameters, states, controller info) so calling code can react programmatically.
When to use it
- When creating Animator Controllers programmatically for characters or props
- When you need to add or audit parameters across many controllers
- To assign a controller to a GameObject at import or initialization time
- When driving animations from game logic by setting parameters or playing states
- To list states in a controller layer for debugging or tooling
Best practices
- Create the controller asset before adding parameters to it
- Use clear, consistent parameter names (Speed, IsGrounded, Jump)
- Pick the correct parameter type: float/int for numeric blends, bool for toggles, trigger for one-shot events
- Set parameters before calling Play to avoid race conditions
- Organize animations with layers for independent control (e.g., body vs face)
Example use cases
- Automate creation of a PlayerController with Speed, IsGrounded, and Jump parameters during project setup
- Assign a controller to an instantiated enemy prefab and immediately set its AI-driven Speed parameter
- Query a controller to list states and build an editor tool that visualizes available animation states and tags
- Trigger a one-shot animation (attack or jump) via a trigger parameter from gameplay code
- Batch-update parameters across many controllers when renaming or standardizing parameter names
FAQ
Use the set-parameter operation with paramType 'trigger'; no value is required and the trigger fires once.
What happens if I try to play a state that does not exist?
Playing a non-existent state will fail; first list or inspect the controller states and ensure the requested state exists in the specified layer.