Skip to content

Commit

Permalink
Merge pull request #96 from nowsprinting/fix/commandline_args_on_player
Browse files Browse the repository at this point in the history
Fix override by commandline args not work on player build
  • Loading branch information
get-me-power authored Nov 5, 2024
2 parents 6c80729 + 267f1c7 commit e087479
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion Editor/Commandline.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 DeNA Co., Ltd.
// This software is released under the MIT License.

using System;
using System.Reflection;
using DeNA.Anjin.Settings;
using UnityEditor;
Expand Down
3 changes: 3 additions & 0 deletions Runtime/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ private static void LaunchAutopilotOnPlayerFromCommandline()
throw new InvalidOperationException("Autopilot is already running");
}

// Apply commandline arguments
settings.OverrideByCommandLineArguments(new Arguments());

state.launchFrom = LaunchType.Commandline;
state.settings = settings;
}
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Settings/AutopilotSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public CompositeReporter Reporter
/// <summary>
/// Overwrites specified values in the command line arguments
/// </summary>
public void OverrideByCommandLineArguments(Arguments args)
internal void OverrideByCommandLineArguments(Arguments args)
{
if (args.RandomSeed.IsCaptured())
{
Expand Down

0 comments on commit e087479

Please sign in to comment.