Animation Events

These bugs in Unity's inbuilt Animation Event system are part of the reason why Animancer Events were implemented. The Events page and Golf Events example compare the differences between the two systems.

Start Event Only Triggers Once

  • Having an Animation Event at time 0 will cause it to be triggered on the first frame when the animation is played.
  • But even if the animation time is later reset to 0 or a negative value, that event will never be triggered again.
  • This issue only occurs when the event time is exactly 0, so you can work around it by using a text editor to open the animation file (or the metadata if it is part of a model such as an FBX file) and changing the event time to a very small value such as 0.00001.
  • Bug Report Case Number: 1230811

Most recent event is not repeated when setting playable time

  • The PlayableExtensions.SetTime method is used to set the time of an animation when using the Playables API.
  • It is supposed to trigger all of the Animation Events between the old and new time during the next frame.
  • However, it fails to re-trigger the most recent event. For example:
    • Imagine an animation with 3 events: A -> B -> C.
    • The animation plays and triggers the events in that order.
    • Then we call SetTime(0) to reset the animation back to the start.
    • During the next animation update it triggers the events again in reverse order, but instead of C -> B -> A it only triggers B -> A.
  • Calling SetTime twice in a row avoids triggering the events, so this bug doesn't really affect Animancer (because we don't want AnimancerState.Time to trigger events anyway).
  • Bug Report Case Number: 1230810