Updated the CrySystem module to execute deferred console commands (#3371)

* Updated the CrySystem module to execute deferred console commands

This allows the CVars declared in CrySystem module to execute commands
invoked before it was loaded.

This is particularly useful for the load level command

resolves #2062

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Moved the invocation of deferred console commands after the LevelSystem
instance has been created

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
lumberyard-employee-dm
2021-08-20 19:46:36 -05:00
committed by GitHub
parent c8c29b1aff
commit c86d650c1a
+4 -1
View File
@@ -1626,6 +1626,9 @@ AZ_POP_DISABLE_WARNING
// Send out EBus event
EBUS_EVENT(CrySystemEventBus, OnCrySystemInitialized, *this, startupParams);
// Execute any deferred commands that uses the CVar commands that were just registered
AZ::Interface<AZ::IConsole>::Get()->ExecuteDeferredConsoleCommands();
// Verify that the Maestro Gem initialized the movie system correctly. This can be removed if and when Maestro is not a required Gem
if (gEnv->IsEditor() && !gEnv->pMovieSystem)
{
@@ -1641,7 +1644,7 @@ AZ_POP_DISABLE_WARNING
m_bInitializedSuccessfully = true;
return (true);
return true;
}