Search Unity

Bug OnPlayableDestroy is called way too late

Discussion in 'Timeline' started by manuelgoellnitz, May 13, 2022.

  1. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    I have a custom timeline track that manipulates the skybox material. And i reset the material to the scenes default skybox material when the timeline is destored with "OnPlayableDestroy".

    Now when I change the scene, while the timeline is running, "OnPlayableDestroy" of that timeline is called after the new scene is allready loaded (even after the Awake-Methods of the Monobehaviors in the new scene).

    That seems to me way too late, and very unexpected.

    In my case the skybox of the new scene is now set by a timeline of the old scene!

    Is there a reason for that behavior?