Changed handling --console_command_file to use AZ::Console::ExecuteConfigFile

This commit is contained in:
pereslav
2021-04-27 12:36:17 +01:00
parent 1e43095123
commit 44ce664730
2 changed files with 2 additions and 21 deletions
+2 -3
View File
@@ -57,8 +57,7 @@ namespace
const AZStd::string& consoleCmd = commandLine->GetSwitchValue(customConCmdKey, numSwitchValues - 1);
if (!consoleCmd.empty())
{
AZStd::string execString = "exec " + consoleCmd;
AZ::Interface<AZ::IConsole>::Get()->PerformCommand(execString.c_str());
AZ::Interface<AZ::IConsole>::Get()->ExecuteConfigFile(consoleCmd.c_str());
}
}
}
@@ -654,7 +653,7 @@ namespace O3DELauncher
if (gEnv && gEnv->pConsole)
{
// Execute autoexec.cfg to load the initial level
AZ::Interface<AZ::IConsole>::Get()->PerformCommand("exec autoexec.cfg");
AZ::Interface<AZ::IConsole>::Get()->ExecuteConfigFile("autoexec.cfg");
// Find out if console command file was passed
// via --console_command_file=%filename% and execute it