Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Animated Values not Updating When Playing Timeline

Discussion in 'Timeline' started by jeshjesh, Apr 7, 2022.

  1. jeshjesh


    Jul 7, 2019
    Hey all,

    I'm using Timeline to build a level sequencer for a Bullet Hell style game. To enable this, I wanted to be able to animate my bullet emitter properties in the timeline, so I could make an emitter shoot progressively bigger, smaller, faster, slower bullets, to create more complex patterns.

    But, it seems that my values only animate properly when I manually scrub through the timeline. See Gif 1, where I select the beginning and end of an animation curve manually, and the bullet scale changes as expected. Gif 2 Shows me shooting bullets with the timeline in Play mode instead, and the scale does not interpolate across the duration of the clip.

    Interestingly, I've noticed that the values do actually animate as-expected if I cause GUI updates on the clip's values in the Inspector by wiggling my mouse across the pane. So I know there must be some update function being called to evaluate these curves, I'd just like to learn how to call it myself. See Gif 3 for an example of that strange behavior

    Hope you can help! Thanks,

    Attached Files: