Skip to main content

Overview

This component is used to dynamically play animations from code:
  • Use Animator — if true, animations will be played on top of existing Animator Controller.
  • Default Clip Pose — this clip will be used as the default pose. It’s only used when Use Animator is false.
Simple Animation Player is added to the same Game Object as the Animator component:

Use-cases

It’s primarily used for animated props like weapons. Instead of creating Animator Controllers for every item, this component lets you play animations from code:
Tip: Animation Assets are used for more granular control over the clip speed and blending settings.
Here’s an example code snippet that shows how Simple Animation Player can be used to play animations for a weapon:
WeaponExample.cs