Search Unity

Get and Set time of TimelineEditorWindow / Playhead location

Discussion in 'Timeline' started by Gif, May 11, 2021.

  1. Gif

    Gif

    Joined:
    Sep 27, 2013
    Posts:
    3
    Hello,
    please, what is the way to get current time/position of Playhead through api?

    I need it for some in-editor manipulation of clips, where context menu (TimelineAction) isn't enough.

    I believe that I need to get it from TimelineWindow (implementation of TimelineEditorWindow), and there is "state.editSequence.time". But I didn't see any way how to get it through api (without Reflection tricks).
    What it the correct way to get the Playhead position/time?

    Is there also way how to set it?

    Thanks.