Fix crash after scripting hot-reload in editor due to cached class attribute objects

#1108
This commit is contained in:
Wojtek Figat
2023-05-19 13:53:49 +02:00
parent 7b8c013918
commit 144b72109b
5 changed files with 33 additions and 0 deletions

View File

@@ -665,6 +665,7 @@ void Scripting::Reload(bool canTriggerSceneReload)
modules.Clear();
_nonNativeModules.ClearDelete();
_hasGameModulesLoaded = false;
MCore::OnMidHotReload();
// Give GC a try to cleanup old user objects and the other mess
MCore::GC::Collect();