I’m trying to get the editor to run in-game, so when the user presses ESC once it starts the editor on the currently active scene, and when he presses ESC again it takes him back to the game.
I’m running into a LOT of difficulty with this, because the editor doesn’t perform any cleanup when Stop() is called, other than calling SaveConfig(). All of the UI elements, cameras, viewports and event handlers remain active after the editor has been stopped.
Is there something I’m missing? Perhaps some script function that I need to call manually to do the cleanup? Perhaps some magic Urho3D::ScriptFile member function that cleans up everything a script has done?
EDIT: Would it perhaps be possible to create a new Context in which I can run the editor, and let the context do the cleanup for me? Is that a viable solution to this issue?