Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Get playhead position in editor scripts

Discussion in 'Timeline' started by jacobrobertsbaca, Mar 25, 2021.

  1. jacobrobertsbaca

    jacobrobertsbaca

    Joined:
    Jul 17, 2018
    Posts:
    6
    Hi there,

    Just wondering if it's currently possible to retrieve the current position of the playhead in the TimelineWindow from an editor script. E.g, such a function would retrieve the value "26" in this example timeline:



    I see
    Code (CSharp):
    1. TimelineEditor.GetInspectedTimeFromMasterTime
    and
    Code (CSharp):
    1. TimelineEditor.GetMasterTimeFromInspectedTime
    but these appear to require a masterTime or inspectedTime, respectively to call.

    Thanks!
     
unityunity