Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Feedback PlayableExtensions.GetDuration() returns unexpected value

Discussion in 'Unity 6 Beta' started by Peter77, Mar 3, 2024.

  1. Peter77


    QA Jesus

    Jun 12, 2013
    The returned value by PlayableExtensions.GetDuration() changes with different extrapolation settings, which I didn't expect.

    I need the playable time and duration to calculate the progress within the playable/clip. However, using any other extrapolation setting than None will not allow me to properly calculate the progress, because it changes the return duration.

    If the PlayableExtensions.GetDuration() return value is "By design", then I would like to see an additional API where I can get the unmodified duration and perhaps a GetProgress() method too, that will return a value between 0 and 1 representing the timeline progress within the clip.

    In the video I go over the problem in detail:

    PS: I'd like to see a response from Unity, so I know that my feedback didn't go into a void.