Rename -game to -play & Fix when play not used.

This commit is contained in:
Jean-Baptiste Perrier
2021-05-23 19:34:16 +02:00
parent 1f3a86dca9
commit 2f12642405
3 changed files with 5 additions and 5 deletions

View File

@@ -232,11 +232,11 @@ void ManagedEditor::Init()
args[0] = &isHeadless;
args[1] = &skipCompile;
Guid sceneId;
if (!CommandLine::Options.Game.HasValue() || (CommandLine::Options.Game.HasValue() && Guid::Parse(CommandLine::Options.Game.GetValue(), sceneId)))
if (!CommandLine::Options.Play.HasValue() || (CommandLine::Options.Play.HasValue() && Guid::Parse(CommandLine::Options.Play.GetValue(), sceneId)))
{
sceneId = Guid::Empty;
}
args[2] = CommandLine::Options.Game.HasValue() ? &sceneId : nullptr;
args[2] = &sceneId;
initMethod->Invoke(instance, args, &exception);
if (exception)
{

View File

@@ -151,7 +151,7 @@ bool CommandLine::Parse(const Char* cmdLine)
PARSE_ARG_SWITCH("-build ", Build);
PARSE_BOOL_SWITCH("-skipcompile ", SkipCompile);
PARSE_BOOL_SWITCH("-shaderdebug ", ShaderDebug);
PARSE_ARG_OPT_SWITCH("-game ", Game);
PARSE_ARG_OPT_SWITCH("-play ", Play);
#endif

View File

@@ -156,9 +156,9 @@ public:
Nullable<bool> ShaderDebug;
/// <summary>
/// -game !scene! ( Scene to play, can be empty to use default )
/// -play !guid! ( Scene to play, can be empty to use default )
/// </summary>
Nullable<String> Game;
Nullable<String> Play;
#endif
};