diff --git a/Editor/Commandline.cs b/Editor/Commandline.cs index ebc35ee..57392c8 100644 --- a/Editor/Commandline.cs +++ b/Editor/Commandline.cs @@ -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; diff --git a/Runtime/Launcher.cs b/Runtime/Launcher.cs index 88eee4a..e85af92 100644 --- a/Runtime/Launcher.cs +++ b/Runtime/Launcher.cs @@ -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; } diff --git a/Runtime/Settings/AutopilotSettings.cs b/Runtime/Settings/AutopilotSettings.cs index eb2680e..4fd47a3 100644 --- a/Runtime/Settings/AutopilotSettings.cs +++ b/Runtime/Settings/AutopilotSettings.cs @@ -194,7 +194,7 @@ public CompositeReporter Reporter /// /// Overwrites specified values in the command line arguments /// - public void OverrideByCommandLineArguments(Arguments args) + internal void OverrideByCommandLineArguments(Arguments args) { if (args.RandomSeed.IsCaptured()) {