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

Bug PlayableDirector.get_duration() generates garbage

Discussion in 'Timeline' started by Midiphony-panda, Sep 13, 2021.

  1. Midiphony-panda

    Midiphony-panda

    Joined:
    Feb 10, 2020
    Posts:
    242
    Hello ! :)

    upload_2021-9-13_19-53-44.png

    While profiling my prototype on Timeline, I noticed that PlayableDirector.get_duration() is allocating memory. Deep profiling shows that the allocation is caused by PlayableAsset.Internal_GetPlayableAssetDuration().

    Is there a reason why or should it be considered a bug ?


    (I'm trying to squeeze the performance out of Timeline so I might come back with other notes like this :p)
     
  2. grahamsaulnier

    grahamsaulnier

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    18
    Hello Midiphony-panda,

    We had an internal report of this earlier this year. There is a fix for this in Timeline 1.6.2, which you should be able to get in the package manager with Unity 2020.3.

    I will back-port the fix to Timeline 1.4 and 1.5, but can't give a date for when they will be released.