Search Unity

How to update AnimationClip on Timeline at Runtime

Discussion in 'Scripting' started by green-giant, Oct 9, 2018.

  1. green-giant

    green-giant

    Joined:
    Jun 21, 2013
    Posts:
    43
    I am working on some editor helper scripts. I have an AnimationClip on an AnimationTrack on the timeline. During gameplay, in editor, I change the animation clip by calling .SetCurve on net AnimationCurve objects. The problem is the changes arent reflected until I exit playmode.

    How can I get the timeline to use the new animation? I tried calling RebuildGraph on the director.