Search Unity

Bug New prefab workflow makes PlayableGraph leak in the Editor

Discussion in 'Prefabs' started by Dmitry-Pyalov, Feb 12, 2021.

  1. Dmitry-Pyalov

    Dmitry-Pyalov

    Joined:
    Dec 13, 2011
    Posts:
    125
    When you launch a scene while editing a prefab, Unity does call OnDisable/OnEnable on the opened prefab components, but when you then stop the scene, Unity calls nothing, but invalidates PlayableGraphs, that were created in the prefab's components. Thus making them leak and spamming "PlayableGraph was not destroyed" messages.

    But Unity doesn't give any means to actually destroy the graph as no OnDisable gets called. It seems like due to Unity's broken life cycle, the graph is created in "runtime" memory space instead of "editor" and thus leaks when leaving play mode.

    Bug report: 1314439
     
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Thank you for reporting the bug