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
@@ -23,27 +23,9 @@
#include <stdio.h>
#include "System.h"
#include <AzCore/IO/FileIO.h>
#include <AzCore/Console/IConsole.h>
IConsole* CConsoleBatchFile::m_pConsole = NULL;
namespace
{
static void exec(const AZ::ConsoleCommandContainer& args)
{
if (args.size() == 1)
{
CConsoleBatchFile::ExecuteConfigFile(args.front().data());
}
else
{
AZ_Warning("editor", false, "exec requires exactly one file name.");
}
}
AZ_CONSOLEFREEFUNC(exec, AZ::ConsoleFunctorFlags::Null, "Executes a batch file of console commands.");
}
void CConsoleBatchFile::Init()
{
m_pConsole = gEnv->pConsole;