Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Why isn't duration passed to ITimeControl.SetTime?

Discussion in 'Timeline' started by CDF, Apr 3, 2019.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,306
    I find myself always needing a normalized time in ITimeControl objects. But I see no way to get duration from there, it would appear I need to create a "duration" variable on my ITimeControl object and copy the duration from the clip to that variable.

    This is very tedious and is breaking the nice iteration flow of resizing clips in Timeline and having scene objects update automatically.

    Any chance ITimeControl.SetTime could also take a duration parameter?

    Or, what other approaches should I take in order to get a normalized time value?

    Thanks
     
  2. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,306
    Even better would be passing a Time structure to ITimeControl.SetTime, which contains similar data to UnityEngine.Playables.FrameData, with the addition of "time" and "duration"
     
    naby-pixiv likes this.