Initialize ScriptingService earlier

This commit is contained in:
2023-08-11 17:09:38 +03:00
parent 9e8865bd12
commit 983c22a3a6
8 changed files with 24 additions and 28 deletions

View File

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