Search Unity

Scripted animations not visible in Timeline preview?

Discussion in 'Timeline' started by george_00, May 20, 2018.

  1. george_00

    george_00

    Joined:
    Oct 23, 2015
    Posts:
    19
    Hi there,

    I have a camera animated on Timeline and some game objects that I want to animate when the camera gets close to them. I originally animated the individual objects on Timeline, but I ended up with too many keyframes and it became too unwieldy to make adjustments (because multiple keyframed animation tracks on the Timeline can't be moved together as a block). So I tried a different approach - using a tween called from a script when the camera hits the box colliders. This works well, but in Timeline preview these animations don't run - I can only see them in Play mode.

    This is a problem for a long Timeline sequence - having to start from the beginning in play mode adds lots of waiting time if you're checking something that's several minutes in. Is there any way to see these events in the preview mode, or does preview really only show events that are keyframed (or activated) on the Timeline itself?

    Thanks for your clarification! Any suggestions for alternative approaches to this are very welcome!
    George
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    If I understand correctly, the issue is that there is no collision trigger happening in Editor. Timeline only animates in editor, it doesn't perform other simulations like physics.

    You could use the recorder to capture the camera path and use that for replaying in Timeline. Or write a custom track that simulates the camera path based on tweens.