Performance: Animator controller
MEDIUM IMPACT
Animator controllers affect frame rendering speed and input responsiveness by controlling animation state changes and blending.
AnimatorController controller = new AnimatorController(); // Use fewer states and simpler transitions // Cache parameters and minimize state changes animator.runtimeAnimatorController = controller;
AnimatorController controller = new AnimatorController(); // Add dozens of states and transitions with complex conditions // Frequent state changes every frame animator.runtimeAnimatorController = controller;
| Pattern | Animation Graph Evaluations | State Transitions | CPU Load | Verdict |
|---|---|---|---|---|
| Complex animator with many states and transitions | High (multiple per frame) | Frequent | High | [X] Bad |
| Simplified animator with fewer states and transitions | Low (minimal per frame) | Infrequent | Low | [OK] Good |