Exposed exec console command to AZ Console
This commit is contained in:
@@ -23,9 +23,27 @@
|
||||
#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;
|
||||
|
||||
Reference in New Issue
Block a user