diff --git a/Code/CryEngine/CrySystem/ConsoleBatchFile.cpp b/Code/CryEngine/CrySystem/ConsoleBatchFile.cpp index 946edb9b64..7d6bc3709f 100644 --- a/Code/CryEngine/CrySystem/ConsoleBatchFile.cpp +++ b/Code/CryEngine/CrySystem/ConsoleBatchFile.cpp @@ -23,9 +23,27 @@ #include #include "System.h" #include +#include 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;