Did this get fixed? Having a little trouble digging up @Peter77 's ticket. i’m on 2018.3.2f1 and still not seeing it firing.
I suspect this probably works if you call UnityEditor.SceneManagement.EditorSceneManager.CloseScene, but that seems to require multiple scenes to be loaded. This is conjecture on my part based on the warning unity gives when calling CloseScene on the active scene.
I really just want a hook when the current scene is about to close so i can clean up some garbage monobehaviours before it’s saved.
Was this issue also affecting 2020.1?
Just tested on 2020.1.0a22 and it seems to be working.
Edit: If you use “discard changes” in a scene, it seems to call the close/closing twice.
The seconds call will have invalid scenes (can be seem below: “scene.name” is empty)