Search Unity

Resolved Timeline updates track views after script have been recompiled

Discussion in 'Timeline' started by sammuttaja, Jan 14, 2021.

  1. sammuttaja

    sammuttaja

    Joined:
    Jul 20, 2015
    Posts:
    3
    Currently when i'm creating new timeline tracks from script, the editor view stays as seen in the first image, and i can't play it, but after the scripts have compiled, the timeline view is updated and works as intended. is there any idea why this is happening as this is getting annoying when i need to clear the timeline and test new script.

    Also it seems like the SetGenericBinding function does not set the gameobject to the track, as there should be gameobject in the activation tracks (it's added almost at the same time as the track is created)
     

    Attached Files:

  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    It's very hard to say without looking at your code. Please file a bug
     
  3. sammuttaja

    sammuttaja

    Joined:
    Jul 20, 2015
    Posts:
    3
    found the reason for the timeline problem: i have delegate in my custon trakcs that is called in OnCreate and OnTrackChanged methods. i had also the TimelineEditor.Refresh(UnityEditor.Timeline.RefreshReason.ContentsAddedOrRemoved) in the delegate method, so it started to loop when track was changed. i don't know if this was informed in the documentation that when timelineEditor is refresh, the tracks get OnTrackChanged call