Revert "Initialize ScriptingService earlier"

This reverts commit 0566e17b23273feffed0c41ed61f7e56d6e8f1a8.
This commit is contained in:
2024-04-18 19:26:38 +03:00
parent a986ede53f
commit c16ec763c2
8 changed files with 28 additions and 24 deletions

View File

@@ -39,7 +39,7 @@ class ScriptingService : public EngineService
{
public:
ScriptingService()
: EngineService(TEXT("Scripting"), -999)
: EngineService(TEXT("Scripting"), -20)
{
}
@@ -703,7 +703,7 @@ void Scripting::Reload(bool canTriggerSceneReload)
_hasGameModulesLoaded = false;
// Release and create a new assembly load context for user assemblies
MCore::LoadScriptingAssemblyLoadContext();
MCore::ReloadScriptingAssemblyLoadContext();
// Give GC a try to cleanup old user objects and the other mess
MCore::GC::Collect();
@@ -1091,6 +1091,9 @@ bool initFlaxEngine()
}
#endif
// TODO: move it somewhere to game instance class or similar
MainRenderTask::Instance = New<MainRenderTask>();
return false;
}