diff --git a/build/Build.CodeGeneration.cs b/build/Build.CodeGeneration.cs index 5b9c86a0c..debbe86ea 100644 --- a/build/Build.CodeGeneration.cs +++ b/build/Build.CodeGeneration.cs @@ -89,7 +89,7 @@ partial class Build "StaticWebApps.json", "Teams.json", "TestCloud.json", - // "Unity.json", + "Unity.json", "VSTest.json", "VSWhere.json", "WebConfigTransformRunner.json", diff --git a/source/Nuke.Common/Tools/Unity/Unity.Generated.cs b/source/Nuke.Common/Tools/Unity/Unity.Generated.cs index 7d1d387a3..6e2ec295e 100644 --- a/source/Nuke.Common/Tools/Unity/Unity.Generated.cs +++ b/source/Nuke.Common/Tools/Unity/Unity.Generated.cs @@ -6,6 +6,7 @@ using Nuke.Common.Tooling; using Nuke.Common.Tools; using Nuke.Common.Utilities.Collections; +using Nuke.Tooling; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -17,4410 +18,1375 @@ namespace Nuke.Common.Tools.Unity; -/// -///

Unity is usually launched by double-clicking its icon from the desktop. However, it is also possible to run it from the command line (from the macOS Terminal or the Windows Command Prompt). When launched in this way, Unity can receive commands and information on startup, which can be very useful for test suites, automated builds and other production tasks.

-///

For more details, visit the official website.

-///
+///

Unity is usually launched by double-clicking its icon from the desktop. However, it is also possible to run it from the command line (from the macOS Terminal or the Windows Command Prompt). When launched in this way, Unity can receive commands and information on startup, which can be very useful for test suites, automated builds and other production tasks.

For more details, visit the official website.

[PublicAPI] [ExcludeFromCodeCoverage] -public partial class UnityTasks +public partial class UnityTasks : ToolTasks { - /// - /// Path to the Unity executable. - /// - public static string UnityPath => - ToolPathResolver.TryGetEnvironmentExecutable("UNITY_EXE") ?? - GetToolPath(); - public static Action UnityLogger { get; set; } = ProcessTasks.DefaultLogger; - public static Action UnityExitHandler { get; set; } = ProcessTasks.DefaultExitHandler; - /// - ///

Unity is usually launched by double-clicking its icon from the desktop. However, it is also possible to run it from the command line (from the macOS Terminal or the Windows Command Prompt). When launched in this way, Unity can receive commands and information on startup, which can be very useful for test suites, automated builds and other production tasks.

- ///

For more details, visit the official website.

- ///
- public static IReadOnlyCollection Unity(ArgumentStringHandler arguments, string workingDirectory = null, IReadOnlyDictionary environmentVariables = null, int? timeout = null, bool? logOutput = null, bool? logInvocation = null, Action logger = null, Action exitHandler = null) - { - using var process = ProcessTasks.StartProcess(UnityPath, arguments, workingDirectory, environmentVariables, timeout, logOutput, logInvocation, logger ?? UnityLogger); - (exitHandler ?? (p => UnityExitHandler.Invoke(null, p))).Invoke(process.AssertWaitForExit()); - return process.Output; - } - /// - ///

(2018.2+) Exports the currently activated license to the path of the Unity executable or either the default Unity license location, see the logs or Activation FAQ for more information.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityCreateManualActivationFile(UnityCreateManualActivationFileSettings toolSettings = null) - { - toolSettings = toolSettings ?? new UnityCreateManualActivationFileSettings(); - PreProcess(ref toolSettings); - using var process = StartProcess(toolSettings); - AssertProcess(process.AssertWaitForExit(), toolSettings); - return process.Output; - } - /// - ///

(2018.2+) Exports the currently activated license to the path of the Unity executable or either the default Unity license location, see the logs or Activation FAQ for more information.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityCreateManualActivationFile(Configure configurator) - { - return UnityCreateManualActivationFile(configurator(new UnityCreateManualActivationFileSettings())); - } - /// - ///

(2018.2+) Exports the currently activated license to the path of the Unity executable or either the default Unity license location, see the logs or Activation FAQ for more information.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IEnumerable<(UnityCreateManualActivationFileSettings Settings, IReadOnlyCollection Output)> UnityCreateManualActivationFile(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) - { - return configurator.Invoke(UnityCreateManualActivationFile, UnityLogger, degreeOfParallelism, completeOnFailure); - } - /// - ///

(2018.2+) Activates Unity with a license file.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -manualLicenseFile via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityManualLicenseFile(UnityManualLicenseFileSettings toolSettings = null) - { - toolSettings = toolSettings ?? new UnityManualLicenseFileSettings(); - PreProcess(ref toolSettings); - using var process = StartProcess(toolSettings); - AssertProcess(process.AssertWaitForExit(), toolSettings); - return process.Output; - } - /// - ///

(2018.2+) Activates Unity with a license file.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -manualLicenseFile via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityManualLicenseFile(Configure configurator) - { - return UnityManualLicenseFile(configurator(new UnityManualLicenseFileSettings())); - } - /// - ///

(2018.2+) Activates Unity with a license file.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -manualLicenseFile via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IEnumerable<(UnityManualLicenseFileSettings Settings, IReadOnlyCollection Output)> UnityManualLicenseFile(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) - { - return configurator.Invoke(UnityManualLicenseFile, UnityLogger, degreeOfParallelism, completeOnFailure); - } - /// - ///

Execute Unity.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -buildLinux32Player via
  • - ///
  • -buildLinux64Player via
  • - ///
  • -buildLinuxUniversalPlayer via
  • - ///
  • -buildOSX64Player via
  • - ///
  • -buildOSXPlayer via
  • - ///
  • -buildOSXUniversalPlayer via
  • - ///
  • -buildWindows64Player via
  • - ///
  • -buildWindowsPlayer via
  • - ///
  • -createProject via
  • - ///
  • -editorTestsCategories via
  • - ///
  • -editorTestsFilter via
  • - ///
  • -editorTestsResultFile via
  • - ///
  • -executeMethod via
  • - ///
  • -exportPackage via
  • - ///
  • -importPackage via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -runEditorTests via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection Unity(UnitySettings toolSettings = null) - { - toolSettings = toolSettings ?? new UnitySettings(); - PreProcess(ref toolSettings); - using var process = StartProcess(toolSettings); - AssertProcess(process.AssertWaitForExit(), toolSettings); - return process.Output; - } - /// - ///

Execute Unity.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -buildLinux32Player via
  • - ///
  • -buildLinux64Player via
  • - ///
  • -buildLinuxUniversalPlayer via
  • - ///
  • -buildOSX64Player via
  • - ///
  • -buildOSXPlayer via
  • - ///
  • -buildOSXUniversalPlayer via
  • - ///
  • -buildWindows64Player via
  • - ///
  • -buildWindowsPlayer via
  • - ///
  • -createProject via
  • - ///
  • -editorTestsCategories via
  • - ///
  • -editorTestsFilter via
  • - ///
  • -editorTestsResultFile via
  • - ///
  • -executeMethod via
  • - ///
  • -exportPackage via
  • - ///
  • -importPackage via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -runEditorTests via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection Unity(Configure configurator) - { - return Unity(configurator(new UnitySettings())); - } - /// - ///

Execute Unity.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -buildLinux32Player via
  • - ///
  • -buildLinux64Player via
  • - ///
  • -buildLinuxUniversalPlayer via
  • - ///
  • -buildOSX64Player via
  • - ///
  • -buildOSXPlayer via
  • - ///
  • -buildOSXUniversalPlayer via
  • - ///
  • -buildWindows64Player via
  • - ///
  • -buildWindowsPlayer via
  • - ///
  • -createProject via
  • - ///
  • -editorTestsCategories via
  • - ///
  • -editorTestsFilter via
  • - ///
  • -editorTestsResultFile via
  • - ///
  • -executeMethod via
  • - ///
  • -exportPackage via
  • - ///
  • -importPackage via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -runEditorTests via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IEnumerable<(UnitySettings Settings, IReadOnlyCollection Output)> Unity(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) - { - return configurator.Invoke(Unity, UnityLogger, degreeOfParallelism, completeOnFailure); - } - /// - ///

Return the currenlty activated Unity license.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityReturnLicense(UnityReturnLicenseSettings toolSettings = null) - { - toolSettings = toolSettings ?? new UnityReturnLicenseSettings(); - PreProcess(ref toolSettings); - using var process = StartProcess(toolSettings); - AssertProcess(process.AssertWaitForExit(), toolSettings); - return process.Output; - } - /// - ///

Return the currenlty activated Unity license.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityReturnLicense(Configure configurator) - { - return UnityReturnLicense(configurator(new UnityReturnLicenseSettings())); - } - /// - ///

Return the currenlty activated Unity license.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -username via
  • - ///
- ///
- public static IEnumerable<(UnityReturnLicenseSettings Settings, IReadOnlyCollection Output)> UnityReturnLicense(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) - { - return configurator.Invoke(UnityReturnLicense, UnityLogger, degreeOfParallelism, completeOnFailure); - } - /// - ///

(2019.2+) Run tests in the project using Unity Test Framework. This argument requires the projectPath, and it's good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -testCategory via
  • - ///
  • -testFilter via
  • - ///
  • -testPlatform via
  • - ///
  • -testResults via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityRunTests(UnityRunTestsSettings toolSettings = null) - { - toolSettings = toolSettings ?? new UnityRunTestsSettings(); - PreProcess(ref toolSettings); - using var process = StartProcess(toolSettings); - AssertProcess(process.AssertWaitForExit(), toolSettings); - return process.Output; - } - /// - ///

(2019.2+) Run tests in the project using Unity Test Framework. This argument requires the projectPath, and it's good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -testCategory via
  • - ///
  • -testFilter via
  • - ///
  • -testPlatform via
  • - ///
  • -testResults via
  • - ///
  • -username via
  • - ///
- ///
- public static IReadOnlyCollection UnityRunTests(Configure configurator) - { - return UnityRunTests(configurator(new UnityRunTestsSettings())); - } - /// - ///

(2019.2+) Run tests in the project using Unity Test Framework. This argument requires the projectPath, and it's good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///

For more details, visit the official website.

- ///
- /// - ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

- ///
    - ///
  • -batchmode via
  • - ///
  • -nographics via
  • - ///
  • -password via
  • - ///
  • -quit via
  • - ///
  • -serial via
  • - ///
  • -silent-crashes via
  • - ///
  • -testCategory via
  • - ///
  • -testFilter via
  • - ///
  • -testPlatform via
  • - ///
  • -testResults via
  • - ///
  • -username via
  • - ///
- ///
- public static IEnumerable<(UnityRunTestsSettings Settings, IReadOnlyCollection Output)> UnityRunTests(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) - { - return configurator.Invoke(UnityRunTests, UnityLogger, degreeOfParallelism, completeOnFailure); - } + public static string UnityPath => new UnityTasks().GetToolPath(); + ///

Unity is usually launched by double-clicking its icon from the desktop. However, it is also possible to run it from the command line (from the macOS Terminal or the Windows Command Prompt). When launched in this way, Unity can receive commands and information on startup, which can be very useful for test suites, automated builds and other production tasks.

For more details, visit the official website.

+ public static IReadOnlyCollection Unity(ArgumentStringHandler arguments, string workingDirectory = null, IReadOnlyDictionary environmentVariables = null, int? timeout = null, bool? logOutput = null, bool? logInvocation = null, Action logger = null, Func exitHandler = null) => new UnityTasks().Run(arguments, workingDirectory, environmentVariables, timeout, logOutput, logInvocation, logger, exitHandler); + ///

(2018.2+) Exports the currently activated license to the path of the Unity executable or either the default Unity license location, see the logs or Activation FAQ for more information.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IReadOnlyCollection UnityCreateManualActivationFile(UnityCreateManualActivationFileSettings options = null) => new UnityTasks().Run(options); + ///

(2018.2+) Exports the currently activated license to the path of the Unity executable or either the default Unity license location, see the logs or Activation FAQ for more information.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IReadOnlyCollection UnityCreateManualActivationFile(Configure configurator) => new UnityTasks().Run(configurator.Invoke(new UnityCreateManualActivationFileSettings())); + ///

(2018.2+) Exports the currently activated license to the path of the Unity executable or either the default Unity license location, see the logs or Activation FAQ for more information.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IEnumerable<(UnityCreateManualActivationFileSettings Settings, IReadOnlyCollection Output)> UnityCreateManualActivationFile(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke2(UnityCreateManualActivationFile, degreeOfParallelism, completeOnFailure); + ///

(2018.2+) Activates Unity with a license file.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -manualLicenseFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IReadOnlyCollection UnityManualLicenseFile(UnityManualLicenseFileSettings options = null) => new UnityTasks().Run(options); + ///

(2018.2+) Activates Unity with a license file.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -manualLicenseFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IReadOnlyCollection UnityManualLicenseFile(Configure configurator) => new UnityTasks().Run(configurator.Invoke(new UnityManualLicenseFileSettings())); + ///

(2018.2+) Activates Unity with a license file.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -manualLicenseFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IEnumerable<(UnityManualLicenseFileSettings Settings, IReadOnlyCollection Output)> UnityManualLicenseFile(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke2(UnityManualLicenseFile, degreeOfParallelism, completeOnFailure); + ///

Execute Unity.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <customArguments> via
  • -accept-apiupdate via
  • -assetServerUpdate via
  • -batchmode via
  • -buildLinux32Player via
  • -buildLinux64Player via
  • -buildLinuxUniversalPlayer via
  • -buildOSX64Player via
  • -buildOSXPlayer via
  • -buildOSXUniversalPlayer via
  • -buildTarget via
  • -buildWindows64Player via
  • -buildWindowsPlayer via
  • -cacheServerIPAddress via
  • -createProject via
  • -disable-assembly-updater via
  • -editorTestsCategories via
  • -editorTestsFilter via
  • -editorTestsResultFile via
  • -executeMethod via
  • -exportPackage via
  • -force-clamped via
  • -force-d3d11 via
  • -force-device-index via
  • -force-gfx-metal via
  • -force-glcore via
  • -force-glcore via
  • -force-gles via
  • -force-gles via
  • -force-low-power-device via
  • -importPackage via
  • -logFile via
  • -nographics via
  • -noUpm via
  • -password via
  • -projectPath via
  • -quit via
  • -runEditorTests via
  • -serial via
  • -setDefaultPlatformTextureFormat via
  • -silent-crashes via
  • -stackTraceLogType via
  • -username via
+ public static IReadOnlyCollection Unity(UnitySettings options = null) => new UnityTasks().Run(options); + ///

Execute Unity.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <customArguments> via
  • -accept-apiupdate via
  • -assetServerUpdate via
  • -batchmode via
  • -buildLinux32Player via
  • -buildLinux64Player via
  • -buildLinuxUniversalPlayer via
  • -buildOSX64Player via
  • -buildOSXPlayer via
  • -buildOSXUniversalPlayer via
  • -buildTarget via
  • -buildWindows64Player via
  • -buildWindowsPlayer via
  • -cacheServerIPAddress via
  • -createProject via
  • -disable-assembly-updater via
  • -editorTestsCategories via
  • -editorTestsFilter via
  • -editorTestsResultFile via
  • -executeMethod via
  • -exportPackage via
  • -force-clamped via
  • -force-d3d11 via
  • -force-device-index via
  • -force-gfx-metal via
  • -force-glcore via
  • -force-glcore via
  • -force-gles via
  • -force-gles via
  • -force-low-power-device via
  • -importPackage via
  • -logFile via
  • -nographics via
  • -noUpm via
  • -password via
  • -projectPath via
  • -quit via
  • -runEditorTests via
  • -serial via
  • -setDefaultPlatformTextureFormat via
  • -silent-crashes via
  • -stackTraceLogType via
  • -username via
+ public static IReadOnlyCollection Unity(Configure configurator) => new UnityTasks().Run(configurator.Invoke(new UnitySettings())); + ///

Execute Unity.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <customArguments> via
  • -accept-apiupdate via
  • -assetServerUpdate via
  • -batchmode via
  • -buildLinux32Player via
  • -buildLinux64Player via
  • -buildLinuxUniversalPlayer via
  • -buildOSX64Player via
  • -buildOSXPlayer via
  • -buildOSXUniversalPlayer via
  • -buildTarget via
  • -buildWindows64Player via
  • -buildWindowsPlayer via
  • -cacheServerIPAddress via
  • -createProject via
  • -disable-assembly-updater via
  • -editorTestsCategories via
  • -editorTestsFilter via
  • -editorTestsResultFile via
  • -executeMethod via
  • -exportPackage via
  • -force-clamped via
  • -force-d3d11 via
  • -force-device-index via
  • -force-gfx-metal via
  • -force-glcore via
  • -force-glcore via
  • -force-gles via
  • -force-gles via
  • -force-low-power-device via
  • -importPackage via
  • -logFile via
  • -nographics via
  • -noUpm via
  • -password via
  • -projectPath via
  • -quit via
  • -runEditorTests via
  • -serial via
  • -setDefaultPlatformTextureFormat via
  • -silent-crashes via
  • -stackTraceLogType via
  • -username via
+ public static IEnumerable<(UnitySettings Settings, IReadOnlyCollection Output)> Unity(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke2(Unity, degreeOfParallelism, completeOnFailure); + ///

Return the currenlty activated Unity license.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IReadOnlyCollection UnityReturnLicense(UnityReturnLicenseSettings options = null) => new UnityTasks().Run(options); + ///

Return the currenlty activated Unity license.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IReadOnlyCollection UnityReturnLicense(Configure configurator) => new UnityTasks().Run(configurator.Invoke(new UnityReturnLicenseSettings())); + ///

Return the currenlty activated Unity license.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • -batchmode via
  • -logFile via
  • -nographics via
  • -password via
  • -quit via
  • -serial via
  • -silent-crashes via
  • -username via
+ public static IEnumerable<(UnityReturnLicenseSettings Settings, IReadOnlyCollection Output)> UnityReturnLicense(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke2(UnityReturnLicense, degreeOfParallelism, completeOnFailure); + ///

(2019.2+) Run tests in the project using Unity Test Framework. This argument requires the projectPath, and it's good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <customArguments> via
  • -accept-apiupdate via
  • -assetServerUpdate via
  • -batchmode via
  • -buildTarget via
  • -cacheServerIPAddress via
  • -disable-assembly-updater via
  • -force-clamped via
  • -force-d3d11 via
  • -force-device-index via
  • -force-gfx-metal via
  • -force-glcore via
  • -force-glcore via
  • -force-gles via
  • -force-gles via
  • -force-low-power-device via
  • -logFile via
  • -nographics via
  • -noUpm via
  • -password via
  • -projectPath via
  • -quit via
  • -serial via
  • -setDefaultPlatformTextureFormat via
  • -silent-crashes via
  • -stackTraceLogType via
  • -testCategory via
  • -testFilter via
  • -testPlatform via
  • -testResults via
  • -username via
+ public static IReadOnlyCollection UnityRunTests(UnityRunTestsSettings options = null) => new UnityTasks().Run(options); + ///

(2019.2+) Run tests in the project using Unity Test Framework. This argument requires the projectPath, and it's good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <customArguments> via
  • -accept-apiupdate via
  • -assetServerUpdate via
  • -batchmode via
  • -buildTarget via
  • -cacheServerIPAddress via
  • -disable-assembly-updater via
  • -force-clamped via
  • -force-d3d11 via
  • -force-device-index via
  • -force-gfx-metal via
  • -force-glcore via
  • -force-glcore via
  • -force-gles via
  • -force-gles via
  • -force-low-power-device via
  • -logFile via
  • -nographics via
  • -noUpm via
  • -password via
  • -projectPath via
  • -quit via
  • -serial via
  • -setDefaultPlatformTextureFormat via
  • -silent-crashes via
  • -stackTraceLogType via
  • -testCategory via
  • -testFilter via
  • -testPlatform via
  • -testResults via
  • -username via
+ public static IReadOnlyCollection UnityRunTests(Configure configurator) => new UnityTasks().Run(configurator.Invoke(new UnityRunTestsSettings())); + ///

(2019.2+) Run tests in the project using Unity Test Framework. This argument requires the projectPath, and it's good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <customArguments> via
  • -accept-apiupdate via
  • -assetServerUpdate via
  • -batchmode via
  • -buildTarget via
  • -cacheServerIPAddress via
  • -disable-assembly-updater via
  • -force-clamped via
  • -force-d3d11 via
  • -force-device-index via
  • -force-gfx-metal via
  • -force-glcore via
  • -force-glcore via
  • -force-gles via
  • -force-gles via
  • -force-low-power-device via
  • -logFile via
  • -nographics via
  • -noUpm via
  • -password via
  • -projectPath via
  • -quit via
  • -serial via
  • -setDefaultPlatformTextureFormat via
  • -silent-crashes via
  • -stackTraceLogType via
  • -testCategory via
  • -testFilter via
  • -testPlatform via
  • -testResults via
  • -username via
+ public static IEnumerable<(UnityRunTestsSettings Settings, IReadOnlyCollection Output)> UnityRunTests(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke2(UnityRunTests, degreeOfParallelism, completeOnFailure); } #region UnityCreateManualActivationFileSettings -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -[Serializable] -public partial class UnityCreateManualActivationFileSettings : UnityBaseSettings +[TypeConverter(typeof(TypeConverter))] +[Command(Type = typeof(UnityTasks), Command = nameof(UnityTasks.UnityCreateManualActivationFile), Arguments = "-createManualActivationFile")] +public partial class UnityCreateManualActivationFileSettings : UnityOptionsBase { - /// - /// Path to the Unity executable. - /// - public override string ProcessToolPath => base.ProcessToolPath ?? GetProcessToolPath(); - public override Action ProcessLogger => base.ProcessLogger ?? UnityTasks.UnityLogger; - public override Action ProcessExitHandler => base.ProcessExitHandler ?? UnityTasks.UnityExitHandler; - /// - /// Enter a username into the log-in form during activation of the Unity Editor. - /// - public virtual string Username { get; internal set; } - /// - /// Enter a password into the log-in form during activation of the Unity Editor. - /// - public virtual string Password { get; internal set; } - /// - /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. - /// - public virtual string Serial { get; internal set; } - /// - /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. - /// - public virtual bool? BatchMode { get; internal set; } - /// - /// Don't display a crash dialog. - /// - public virtual bool? SilentCrashes { get; internal set; } - /// - /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. - /// - public virtual bool? NoGraphics { get; internal set; } - /// - /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). - /// - public virtual bool? Quit { get; internal set; } - protected override Arguments ConfigureProcessArguments(Arguments arguments) - { - arguments - .Add("-createManualActivationFile") - .Add("-username {value}", Username) - .Add("-password {value}", Password, secret: true) - .Add("-serial {value}", Serial, secret: true) - .Add("-batchmode", BatchMode) - .Add("-silent-crashes", SilentCrashes) - .Add("-nographics", NoGraphics) - .Add("-quit", Quit); - return base.ConfigureProcessArguments(arguments); - } + /// Enter a username into the log-in form during activation of the Unity Editor. + [Argument(Format = "-username {value}")] public string Username => Get(() => Username); + /// Enter a password into the log-in form during activation of the Unity Editor. + [Argument(Format = "-password {value}", Secret = true)] public string Password => Get(() => Password); + /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. + [Argument(Format = "-serial {value}", Secret = true)] public string Serial => Get(() => Serial); + /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. + [Argument(Format = "-batchmode")] public bool? BatchMode => Get(() => BatchMode); + /// Don't display a crash dialog. + [Argument(Format = "-silent-crashes")] public bool? SilentCrashes => Get(() => SilentCrashes); + /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. + [Argument(Format = "-nographics")] public bool? NoGraphics => Get(() => NoGraphics); + /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). + [Argument(Format = "-quit")] public bool? Quit => Get(() => Quit); } #endregion #region UnityManualLicenseFileSettings -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -[Serializable] -public partial class UnityManualLicenseFileSettings : UnityBaseSettings +[TypeConverter(typeof(TypeConverter))] +[Command(Type = typeof(UnityTasks), Command = nameof(UnityTasks.UnityManualLicenseFile))] +public partial class UnityManualLicenseFileSettings : UnityOptionsBase { - /// - /// Path to the Unity executable. - /// - public override string ProcessToolPath => base.ProcessToolPath ?? GetProcessToolPath(); - public override Action ProcessLogger => base.ProcessLogger ?? UnityTasks.UnityLogger; - public override Action ProcessExitHandler => base.ProcessExitHandler ?? UnityTasks.UnityExitHandler; - /// - /// The path to the license file. - /// - public virtual string LicenseFile { get; internal set; } - /// - /// Enter a username into the log-in form during activation of the Unity Editor. - /// - public virtual string Username { get; internal set; } - /// - /// Enter a password into the log-in form during activation of the Unity Editor. - /// - public virtual string Password { get; internal set; } - /// - /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. - /// - public virtual string Serial { get; internal set; } - /// - /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. - /// - public virtual bool? BatchMode { get; internal set; } - /// - /// Don't display a crash dialog. - /// - public virtual bool? SilentCrashes { get; internal set; } - /// - /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. - /// - public virtual bool? NoGraphics { get; internal set; } - /// - /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). - /// - public virtual bool? Quit { get; internal set; } - protected override Arguments ConfigureProcessArguments(Arguments arguments) - { - arguments - .Add("-manualLicenseFile {value}", LicenseFile) - .Add("-username {value}", Username) - .Add("-password {value}", Password, secret: true) - .Add("-serial {value}", Serial, secret: true) - .Add("-batchmode", BatchMode) - .Add("-silent-crashes", SilentCrashes) - .Add("-nographics", NoGraphics) - .Add("-quit", Quit); - return base.ConfigureProcessArguments(arguments); - } + /// The path to the license file. + [Argument(Format = "-manualLicenseFile {value}")] public string LicenseFile => Get(() => LicenseFile); + /// Enter a username into the log-in form during activation of the Unity Editor. + [Argument(Format = "-username {value}")] public string Username => Get(() => Username); + /// Enter a password into the log-in form during activation of the Unity Editor. + [Argument(Format = "-password {value}", Secret = true)] public string Password => Get(() => Password); + /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. + [Argument(Format = "-serial {value}", Secret = true)] public string Serial => Get(() => Serial); + /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. + [Argument(Format = "-batchmode")] public bool? BatchMode => Get(() => BatchMode); + /// Don't display a crash dialog. + [Argument(Format = "-silent-crashes")] public bool? SilentCrashes => Get(() => SilentCrashes); + /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. + [Argument(Format = "-nographics")] public bool? NoGraphics => Get(() => NoGraphics); + /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). + [Argument(Format = "-quit")] public bool? Quit => Get(() => Quit); } #endregion #region UnitySettings -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -[Serializable] -public partial class UnitySettings : UnityProjectSettings +[TypeConverter(typeof(TypeConverter))] +[Command(Type = typeof(UnityTasks), Command = nameof(UnityTasks.Unity))] +public partial class UnitySettings : UnityProjectOptions { - /// - /// Path to the Unity executable. - /// - public override string ProcessToolPath => base.ProcessToolPath ?? GetProcessToolPath(); - public override Action ProcessLogger => base.ProcessLogger ?? UnityTasks.UnityLogger; - public override Action ProcessExitHandler => base.ProcessExitHandler ?? UnityTasks.UnityExitHandler; - /// - /// Build a 32-bit standalone Linux player (for example, -buildLinux32Player path/to/your/build). - /// - public virtual string BuildLinux32Player { get; internal set; } - /// - /// Build a 64-bit standalone Linux player (for example, -buildLinux64Player path/to/your/build). - /// - public virtual string BuildLinux64Player { get; internal set; } - /// - /// Build a combined 32-bit and 64-bit standalone Linux player (for example, -buildLinuxUniversalPlayer path/to/your/build). - /// - public virtual string BuildLinuxUniversalPlayer { get; internal set; } - /// - /// Build a 32-bit standalone Mac OSX player (for example, -buildOSXPlayer path/to/your/build.app). - /// - public virtual string BuildOSXPlayer { get; internal set; } - /// - /// Build a 64-bit standalone Mac OSX player (for example, -buildOSX64Player path/to/your/build.app). - /// - public virtual string BuildOSX64Player { get; internal set; } - /// - /// Build a combined 32-bit and 64-bit standalone Mac OSX player (for example, -buildOSXUniversalPlayer path/to/your/build.app). - /// - public virtual string BuildOSXUniversalPlayer { get; internal set; } - /// - /// Build a 32-bit standalone Windows player (for example, -buildWindowsPlayer path/to/your/build.exe). - /// - public virtual string BuildWindowsPlayer { get; internal set; } - /// - /// Build a 64-bit standalone Windows player (for example, -buildWindows64Player path/to/your/build.exe). - /// - public virtual string BuildWindows64Player { get; internal set; } - /// - /// Create an empty project at the given path. - /// - public virtual string CreateProject { get; internal set; } - /// - /// Execute the static method as soon as Unity is started, the project is open and after the optional Asset server update has been performed. This can be used to do tasks such as continous integration, performing Unit Tests, making builds or preparing data. To return an error from the command line process, either throw an exception which causes Unity to exit with return code 1, or call EditorApplication.Exit with a non-zero return code.To use ExecuteMethod, you need to place the enclosing script in an Editor folder. The method to be executed must be defined as static. - /// - public virtual string ExecuteMethod { get; internal set; } - /// - /// Import the given package. No import dialog is shown. - /// - public virtual string ImportPackage { get; internal set; } - /// - /// Run Editor tests from the project. This argument requires the projectPath, and it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished. - /// - public virtual bool? RunEditorTests { get; internal set; } - /// - /// Filter editor tests by categories. - /// - public virtual IReadOnlyList EditorTestsCategories => EditorTestsCategoriesInternal.AsReadOnly(); - internal List EditorTestsCategoriesInternal { get; set; } = new List(); - /// - /// Filter editor tests by names. - /// - public virtual IReadOnlyList EditorTestsFilter => EditorTestsFilterInternal.AsReadOnly(); - internal List EditorTestsFilterInternal { get; set; } = new List(); - /// - /// Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder. - /// - public virtual string EditorTestsResultFile { get; internal set; } - /// - /// Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument. - /// - public virtual IReadOnlyList ExportPackage => ExportPackageInternal.AsReadOnly(); - internal List ExportPackageInternal { get; set; } = new List(); - /// - /// Enter a username into the log-in form during activation of the Unity Editor. - /// - public virtual string Username { get; internal set; } - /// - /// Enter a password into the log-in form during activation of the Unity Editor. - /// - public virtual string Password { get; internal set; } - /// - /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. - /// - public virtual string Serial { get; internal set; } - /// - /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. - /// - public virtual bool? BatchMode { get; internal set; } - /// - /// Don't display a crash dialog. - /// - public virtual bool? SilentCrashes { get; internal set; } - /// - /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. - /// - public virtual bool? NoGraphics { get; internal set; } - /// - /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). - /// - public virtual bool? Quit { get; internal set; } - protected override Arguments ConfigureProcessArguments(Arguments arguments) - { - arguments - .Add("-buildLinux32Player {value}", BuildLinux32Player) - .Add("-buildLinux64Player {value}", BuildLinux64Player) - .Add("-buildLinuxUniversalPlayer {value}", BuildLinuxUniversalPlayer) - .Add("-buildOSXPlayer {value}", BuildOSXPlayer) - .Add("-buildOSX64Player {value}", BuildOSX64Player) - .Add("-buildOSXUniversalPlayer {value}", BuildOSXUniversalPlayer) - .Add("-buildWindowsPlayer {value}", BuildWindowsPlayer) - .Add("-buildWindows64Player {value}", BuildWindows64Player) - .Add("-createProject {value}", CreateProject) - .Add("-executeMethod {value}", ExecuteMethod) - .Add("-importPackage {value}", ImportPackage) - .Add("-runEditorTests", RunEditorTests) - .Add("-editorTestsCategories {value}", EditorTestsCategories, separator: ',') - .Add("-editorTestsFilter {value}", EditorTestsFilter, separator: ',') - .Add("-editorTestsResultFile {value}", EditorTestsResultFile) - .Add("-exportPackage {value}", ExportPackage, separator: ' ') - .Add("-username {value}", Username) - .Add("-password {value}", Password, secret: true) - .Add("-serial {value}", Serial, secret: true) - .Add("-batchmode", BatchMode) - .Add("-silent-crashes", SilentCrashes) - .Add("-nographics", NoGraphics) - .Add("-quit", Quit); - return base.ConfigureProcessArguments(arguments); - } + /// Build a 32-bit standalone Linux player (for example, -buildLinux32Player path/to/your/build). + [Argument(Format = "-buildLinux32Player {value}")] public string BuildLinux32Player => Get(() => BuildLinux32Player); + /// Build a 64-bit standalone Linux player (for example, -buildLinux64Player path/to/your/build). + [Argument(Format = "-buildLinux64Player {value}")] public string BuildLinux64Player => Get(() => BuildLinux64Player); + /// Build a combined 32-bit and 64-bit standalone Linux player (for example, -buildLinuxUniversalPlayer path/to/your/build). + [Argument(Format = "-buildLinuxUniversalPlayer {value}")] public string BuildLinuxUniversalPlayer => Get(() => BuildLinuxUniversalPlayer); + /// Build a 32-bit standalone Mac OSX player (for example, -buildOSXPlayer path/to/your/build.app). + [Argument(Format = "-buildOSXPlayer {value}")] public string BuildOSXPlayer => Get(() => BuildOSXPlayer); + /// Build a 64-bit standalone Mac OSX player (for example, -buildOSX64Player path/to/your/build.app). + [Argument(Format = "-buildOSX64Player {value}")] public string BuildOSX64Player => Get(() => BuildOSX64Player); + /// Build a combined 32-bit and 64-bit standalone Mac OSX player (for example, -buildOSXUniversalPlayer path/to/your/build.app). + [Argument(Format = "-buildOSXUniversalPlayer {value}")] public string BuildOSXUniversalPlayer => Get(() => BuildOSXUniversalPlayer); + /// Build a 32-bit standalone Windows player (for example, -buildWindowsPlayer path/to/your/build.exe). + [Argument(Format = "-buildWindowsPlayer {value}")] public string BuildWindowsPlayer => Get(() => BuildWindowsPlayer); + /// Build a 64-bit standalone Windows player (for example, -buildWindows64Player path/to/your/build.exe). + [Argument(Format = "-buildWindows64Player {value}")] public string BuildWindows64Player => Get(() => BuildWindows64Player); + /// Create an empty project at the given path. + [Argument(Format = "-createProject {value}")] public string CreateProject => Get(() => CreateProject); + /// Execute the static method as soon as Unity is started, the project is open and after the optional Asset server update has been performed. This can be used to do tasks such as continous integration, performing Unit Tests, making builds or preparing data. To return an error from the command line process, either throw an exception which causes Unity to exit with return code 1, or call EditorApplication.Exit with a non-zero return code.To use ExecuteMethod, you need to place the enclosing script in an Editor folder. The method to be executed must be defined as static. + [Argument(Format = "-executeMethod {value}")] public string ExecuteMethod => Get(() => ExecuteMethod); + /// Import the given package. No import dialog is shown. + [Argument(Format = "-importPackage {value}")] public string ImportPackage => Get(() => ImportPackage); + /// Run Editor tests from the project. This argument requires the projectPath, and it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished. + [Argument(Format = "-runEditorTests")] public bool? RunEditorTests => Get(() => RunEditorTests); + /// Filter editor tests by categories. + [Argument(Format = "-editorTestsCategories {value}", Separator = ",")] public IReadOnlyList EditorTestsCategories => Get>(() => EditorTestsCategories); + /// Filter editor tests by names. + [Argument(Format = "-editorTestsFilter {value}", Separator = ",")] public IReadOnlyList EditorTestsFilter => Get>(() => EditorTestsFilter); + /// Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder. + [Argument(Format = "-editorTestsResultFile {value}")] public string EditorTestsResultFile => Get(() => EditorTestsResultFile); + /// Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument. + [Argument(Format = "-exportPackage {value}", Separator = " ")] public IReadOnlyList ExportPackage => Get>(() => ExportPackage); + /// Enter a username into the log-in form during activation of the Unity Editor. + [Argument(Format = "-username {value}")] public string Username => Get(() => Username); + /// Enter a password into the log-in form during activation of the Unity Editor. + [Argument(Format = "-password {value}", Secret = true)] public string Password => Get(() => Password); + /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. + [Argument(Format = "-serial {value}", Secret = true)] public string Serial => Get(() => Serial); + /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. + [Argument(Format = "-batchmode")] public bool? BatchMode => Get(() => BatchMode); + /// Don't display a crash dialog. + [Argument(Format = "-silent-crashes")] public bool? SilentCrashes => Get(() => SilentCrashes); + /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. + [Argument(Format = "-nographics")] public bool? NoGraphics => Get(() => NoGraphics); + /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). + [Argument(Format = "-quit")] public bool? Quit => Get(() => Quit); } #endregion #region UnityReturnLicenseSettings -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -[Serializable] -public partial class UnityReturnLicenseSettings : UnityBaseSettings +[TypeConverter(typeof(TypeConverter))] +[Command(Type = typeof(UnityTasks), Command = nameof(UnityTasks.UnityReturnLicense), Arguments = "-returnlicense")] +public partial class UnityReturnLicenseSettings : UnityOptionsBase { - /// - /// Path to the Unity executable. - /// - public override string ProcessToolPath => base.ProcessToolPath ?? GetProcessToolPath(); - public override Action ProcessLogger => base.ProcessLogger ?? UnityTasks.UnityLogger; - public override Action ProcessExitHandler => base.ProcessExitHandler ?? UnityTasks.UnityExitHandler; - /// - /// Enter a username into the log-in form during activation of the Unity Editor. - /// - public virtual string Username { get; internal set; } - /// - /// Enter a password into the log-in form during activation of the Unity Editor. - /// - public virtual string Password { get; internal set; } - /// - /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. - /// - public virtual string Serial { get; internal set; } - /// - /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. - /// - public virtual bool? BatchMode { get; internal set; } - /// - /// Don't display a crash dialog. - /// - public virtual bool? SilentCrashes { get; internal set; } - /// - /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. - /// - public virtual bool? NoGraphics { get; internal set; } - /// - /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). - /// - public virtual bool? Quit { get; internal set; } - protected override Arguments ConfigureProcessArguments(Arguments arguments) - { - arguments - .Add("-returnlicense") - .Add("-username {value}", Username) - .Add("-password {value}", Password, secret: true) - .Add("-serial {value}", Serial, secret: true) - .Add("-batchmode", BatchMode) - .Add("-silent-crashes", SilentCrashes) - .Add("-nographics", NoGraphics) - .Add("-quit", Quit); - return base.ConfigureProcessArguments(arguments); - } + /// Enter a username into the log-in form during activation of the Unity Editor. + [Argument(Format = "-username {value}")] public string Username => Get(() => Username); + /// Enter a password into the log-in form during activation of the Unity Editor. + [Argument(Format = "-password {value}", Secret = true)] public string Password => Get(() => Password); + /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. + [Argument(Format = "-serial {value}", Secret = true)] public string Serial => Get(() => Serial); + /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. + [Argument(Format = "-batchmode")] public bool? BatchMode => Get(() => BatchMode); + /// Don't display a crash dialog. + [Argument(Format = "-silent-crashes")] public bool? SilentCrashes => Get(() => SilentCrashes); + /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. + [Argument(Format = "-nographics")] public bool? NoGraphics => Get(() => NoGraphics); + /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). + [Argument(Format = "-quit")] public bool? Quit => Get(() => Quit); } #endregion #region UnityRunTestsSettings -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -[Serializable] -public partial class UnityRunTestsSettings : UnityProjectSettings +[TypeConverter(typeof(TypeConverter))] +[Command(Type = typeof(UnityTasks), Command = nameof(UnityTasks.UnityRunTests), Arguments = "-runTests")] +public partial class UnityRunTestsSettings : UnityProjectOptions { - /// - /// Path to the Unity executable. - /// - public override string ProcessToolPath => base.ProcessToolPath ?? GetProcessToolPath(); - public override Action ProcessLogger => base.ProcessLogger ?? UnityTasks.UnityLogger; - public override Action ProcessExitHandler => base.ProcessExitHandler ?? UnityTasks.UnityExitHandler; - /// - /// A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run. - /// - public virtual IReadOnlyList TestCategories => TestCategoriesInternal.AsReadOnly(); - internal List TestCategoriesInternal { get; set; } = new List(); - /// - /// A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'. - /// - public virtual IReadOnlyList TestFilters => TestFiltersInternal.AsReadOnly(); - internal List TestFiltersInternal { get; set; } = new List(); - /// - /// Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder. - /// - public virtual string TestResultFile { get; internal set; } - /// - /// The platform to run tests on. - /// - public virtual string TestPlatform { get; internal set; } - /// - /// Enter a username into the log-in form during activation of the Unity Editor. - /// - public virtual string Username { get; internal set; } - /// - /// Enter a password into the log-in form during activation of the Unity Editor. - /// - public virtual string Password { get; internal set; } - /// - /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. - /// - public virtual string Serial { get; internal set; } - /// - /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. - /// - public virtual bool? BatchMode { get; internal set; } - /// - /// Don't display a crash dialog. - /// - public virtual bool? SilentCrashes { get; internal set; } - /// - /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. - /// - public virtual bool? NoGraphics { get; internal set; } - /// - /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). - /// - public virtual bool? Quit { get; internal set; } - protected override Arguments ConfigureProcessArguments(Arguments arguments) - { - arguments - .Add("-runTests") - .Add("-testCategory {value}", TestCategories, separator: ';', quoteMultiple: true) - .Add("-testFilter {value}", TestFilters, separator: ';', quoteMultiple: true) - .Add("-testResults {value}", TestResultFile) - .Add("-testPlatform {value}", TestPlatform) - .Add("-username {value}", Username) - .Add("-password {value}", Password, secret: true) - .Add("-serial {value}", Serial, secret: true) - .Add("-batchmode", BatchMode) - .Add("-silent-crashes", SilentCrashes) - .Add("-nographics", NoGraphics) - .Add("-quit", Quit); - return base.ConfigureProcessArguments(arguments); - } + /// A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run. + [Argument(Format = "-testCategory {value}", Separator = ";", QuoteMultiple = true)] public IReadOnlyList TestCategories => Get>(() => TestCategories); + /// A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'. + [Argument(Format = "-testFilter {value}", Separator = ";", QuoteMultiple = true)] public IReadOnlyList TestFilters => Get>(() => TestFilters); + /// Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder. + [Argument(Format = "-testResults {value}")] public string TestResultFile => Get(() => TestResultFile); + /// The platform to run tests on. + [Argument(Format = "-testPlatform {value}")] public UnityTestPlatform TestPlatform => Get(() => TestPlatform); + /// Enter a username into the log-in form during activation of the Unity Editor. + [Argument(Format = "-username {value}")] public string Username => Get(() => Username); + /// Enter a password into the log-in form during activation of the Unity Editor. + [Argument(Format = "-password {value}", Secret = true)] public string Password => Get(() => Password); + /// Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info. + [Argument(Format = "-serial {value}", Secret = true)] public string Serial => Get(() => Serial); + /// Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time. + [Argument(Format = "-batchmode")] public bool? BatchMode => Get(() => BatchMode); + /// Don't display a crash dialog. + [Argument(Format = "-silent-crashes")] public bool? SilentCrashes => Get(() => SilentCrashes); + /// When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration. + [Argument(Format = "-nographics")] public bool? NoGraphics => Get(() => NoGraphics); + /// Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). + [Argument(Format = "-quit")] public bool? Quit => Get(() => Quit); } #endregion -#region UnityBaseSettings -/// -/// Used within . -/// +#region UnityOptionsBase +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -[Serializable] -public partial class UnityBaseSettings : ToolSettings +[TypeConverter(typeof(TypeConverter))] +public partial class UnityOptionsBase : ToolOptions { - /// - /// Specify where the Editor or Windows/Linux/OSX standalone log file are written. - /// - public virtual string LogFile { get; internal set; } - /// - /// (experimental) If set to true only warnings and errors will be printed to the output. - /// - public virtual bool? MinimalOutput { get; internal set; } - /// - /// Define exit codes which will not fail the build. - /// - public virtual IReadOnlyList StableExitCodes => StableExitCodesInternal.AsReadOnly(); - internal List StableExitCodesInternal { get; set; } = new List(); - /// - /// Defines the Unity version to use. The version must be installed via Unity Hub. - /// - public virtual string HubVersion { get; internal set; } - protected override Arguments ConfigureProcessArguments(Arguments arguments) - { - arguments - .Add("-logFile {value}", GetLogFile(), customValue: true); - return base.ConfigureProcessArguments(arguments); - } + /// Specify where the Editor or Windows/Linux/OSX standalone log file are written. + [Argument(Format = "-logFile {value}")] public string LogFile => Get(() => LogFile); + /// (experimental) If set to true only warnings and errors will be printed to the output. + public bool? MinimalOutput => Get(() => MinimalOutput); + /// Define exit codes which will not fail the build. + public IReadOnlyList StableExitCodes => Get>(() => StableExitCodes); + /// Defines the Unity version to use. The version must be installed via Unity Hub. + public string HubVersion => Get(() => HubVersion); } #endregion -#region UnityProjectSettings -/// -/// Used within . -/// +#region UnityProjectOptions +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -[Serializable] -public partial class UnityProjectSettings : UnityBaseSettings +[TypeConverter(typeof(TypeConverter))] +public partial class UnityProjectOptions : UnityOptionsBase { - /// - /// Force an update of the project in the Asset Server given by IP:port. The port is optional, and if not given it is assumed to be the standard one (10733). It is advisable to use this command in conjunction with the -projectPath argument to ensure you are working with the correct project. If no project name is given, then the last project opened by Unity is used. If no project exists at the path given by -projectPath, then one is created automatically. - /// - public virtual string AssetServerUpdate { get; internal set; } - /// - /// Allows the selection of an active build target before a project is loaded. - /// - public virtual string BuildTarget { get; internal set; } - /// - /// (Windows only) Make the Editor use Direct3D 11 for rendering. Normally the graphics API depends on player settings (typically defaults to D3D11). - /// - public virtual bool? ForceD3d11 { get; internal set; } - /// - /// (macOS only) When using Metal, make the Editor use a particular GPU device by passing it the index of that GPU. - /// - public virtual bool? ForceDeviceIndex { get; internal set; } - /// - /// (macOS only) Make the Editor use Metal as the default graphics API. - /// - public virtual bool? ForceGfxMetal { get; internal set; } - /// - /// (Windows only) Make the Editor use OpenGL 3/4 core profile for rendering. The Editor tries to use the best OpenGL version available and all OpenGL extensions exposed by the OpenGL drivers. If the platform isn't supported, Direct3D is used. - /// - public virtual bool? ForceGLCore { get; internal set; } - /// - /// (Windows only) Similar to -force-glcore, but requests a specific OpenGL context version. Accepted values for XY: 32, 33, 40, 41, 42, 43, 44 or 45. - /// - public virtual UnityGLCore ForceGLCoreXY { get; internal set; } - /// - /// (Windows only) Make the Editor use OpenGL for Embedded Systems for rendering. The Editor tries to use the best OpenGL ES version available, and all OpenGL ES extensions exposed by the OpenGL drivers. - /// - public virtual bool? ForceGLES { get; internal set; } - /// - /// (Windows only) Similar to -force-gles, but requests a specific OpenGL ES context version. Accepted values for XY: 30, 31 or 32. - /// - public virtual UnityGLES ForceGLESXY { get; internal set; } - /// - /// (2017.3+) (Windows only) Used with -force-glcoreXY to prevent checking for additional OpenGL extensions, allowing it to run between platforms with the same code paths. - /// - public virtual bool? ForceClamped { get; internal set; } - /// - /// (macOS only) When using Metal, make the Editor use a low power device. - /// - public virtual bool? ForceLowPowerDevice { get; internal set; } - /// - /// (2018.1+) Sets the default texture compression to the desired format before importing a texture or building the project. This is so you don’t have to import the texture again with the format you want. The available formats are dxt, pvrtc, atc, etc, etc2, and astc. Note that this is only supported on Android. - /// - public virtual string DefaultPlatformTextureFormat { get; internal set; } - /// - /// Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies. - /// - public virtual IReadOnlyList DisableAssemblyUpdater => DisableAssemblyUpdaterInternal.AsReadOnly(); - internal List DisableAssemblyUpdaterInternal { get; set; } = new List(); - /// - /// (2018.1+) Connect to the Cache Server given by IP:port on startup, overriding any configuration stored in the Editor Preferences. Use this to connect multiple instances of Unity to different Cache Servers. - /// - public virtual string CacheServerIPAddress { get; internal set; } - /// - /// (2018.1+) Disables the Unity Package Manager. - /// - public virtual bool? NoUpm { get; internal set; } - /// - /// (2017.2+) Use this command line option to specify that APIUpdater should run when Unity is launched in batch mode. Omitting this command line argument when launching Unity in batch mode results in APIUpdater not running which can lead to compiler errors. Note that in versions prior to 2017.2 there’s no way to not run APIUpdater when Unity is launched in batch mode. - /// - public virtual bool? AcceptApiUpdate { get; internal set; } - /// - /// Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs. - /// - public virtual IReadOnlyList CustomArguments => CustomArgumentsInternal.AsReadOnly(); - internal List CustomArgumentsInternal { get; set; } = new List(); - /// - /// Detailed debugging feature. StackTraceLogging allows you to allow detailed logging. - /// - public virtual UnityStackTraceLogType StackTraceLogType { get; internal set; } - /// - /// Specify the path of the unity project. - /// - public virtual string ProjectPath { get; internal set; } - protected override Arguments ConfigureProcessArguments(Arguments arguments) - { - arguments - .Add("-assetServerUpdate {value}", AssetServerUpdate) - .Add("-buildTarget {value}", BuildTarget) - .Add("-force-d3d11", ForceD3d11) - .Add("-force-device-index", ForceDeviceIndex) - .Add("-force-gfx-metal", ForceGfxMetal) - .Add("-force-glcore", ForceGLCore) - .Add("-force-glcore{value}", ForceGLCoreXY) - .Add("-force-gles", ForceGLES) - .Add("-force-gles{value}", ForceGLESXY) - .Add("-force-clamped", ForceClamped) - .Add("-force-low-power-device", ForceLowPowerDevice) - .Add("-setDefaultPlatformTextureFormat {value}", DefaultPlatformTextureFormat) - .Add("-disable-assembly-updater {value}", DisableAssemblyUpdater, separator: ' ') - .Add("-cacheServerIPAddress {value}", CacheServerIPAddress) - .Add("-noUpm", NoUpm) - .Add("-accept-apiupdate", AcceptApiUpdate) - .Add("{value}", CustomArguments, separator: ' ') - .Add("-stackTraceLogType {value}", StackTraceLogType) - .Add("-projectPath {value}", ProjectPath); - return base.ConfigureProcessArguments(arguments); - } + /// Force an update of the project in the Asset Server given by IP:port. The port is optional, and if not given it is assumed to be the standard one (10733). It is advisable to use this command in conjunction with the -projectPath argument to ensure you are working with the correct project. If no project name is given, then the last project opened by Unity is used. If no project exists at the path given by -projectPath, then one is created automatically. + [Argument(Format = "-assetServerUpdate {value}")] public string AssetServerUpdate => Get(() => AssetServerUpdate); + /// Allows the selection of an active build target before a project is loaded. + [Argument(Format = "-buildTarget {value}")] public UnityBuildTarget BuildTarget => Get(() => BuildTarget); + /// (Windows only) Make the Editor use Direct3D 11 for rendering. Normally the graphics API depends on player settings (typically defaults to D3D11). + [Argument(Format = "-force-d3d11")] public bool? ForceD3d11 => Get(() => ForceD3d11); + /// (macOS only) When using Metal, make the Editor use a particular GPU device by passing it the index of that GPU. + [Argument(Format = "-force-device-index")] public bool? ForceDeviceIndex => Get(() => ForceDeviceIndex); + /// (macOS only) Make the Editor use Metal as the default graphics API. + [Argument(Format = "-force-gfx-metal")] public bool? ForceGfxMetal => Get(() => ForceGfxMetal); + /// (Windows only) Make the Editor use OpenGL 3/4 core profile for rendering. The Editor tries to use the best OpenGL version available and all OpenGL extensions exposed by the OpenGL drivers. If the platform isn't supported, Direct3D is used. + [Argument(Format = "-force-glcore")] public bool? ForceGLCore => Get(() => ForceGLCore); + /// (Windows only) Similar to -force-glcore, but requests a specific OpenGL context version. Accepted values for XY: 32, 33, 40, 41, 42, 43, 44 or 45. + [Argument(Format = "-force-glcore{value}")] public UnityGLCore ForceGLCoreXY => Get(() => ForceGLCoreXY); + /// (Windows only) Make the Editor use OpenGL for Embedded Systems for rendering. The Editor tries to use the best OpenGL ES version available, and all OpenGL ES extensions exposed by the OpenGL drivers. + [Argument(Format = "-force-gles")] public bool? ForceGLES => Get(() => ForceGLES); + /// (Windows only) Similar to -force-gles, but requests a specific OpenGL ES context version. Accepted values for XY: 30, 31 or 32. + [Argument(Format = "-force-gles{value}")] public UnityGLES ForceGLESXY => Get(() => ForceGLESXY); + /// (2017.3+) (Windows only) Used with -force-glcoreXY to prevent checking for additional OpenGL extensions, allowing it to run between platforms with the same code paths. + [Argument(Format = "-force-clamped")] public bool? ForceClamped => Get(() => ForceClamped); + /// (macOS only) When using Metal, make the Editor use a low power device. + [Argument(Format = "-force-low-power-device")] public bool? ForceLowPowerDevice => Get(() => ForceLowPowerDevice); + /// (2018.1+) Sets the default texture compression to the desired format before importing a texture or building the project. This is so you don’t have to import the texture again with the format you want. The available formats are dxt, pvrtc, atc, etc, etc2, and astc. Note that this is only supported on Android. + [Argument(Format = "-setDefaultPlatformTextureFormat {value}")] public string DefaultPlatformTextureFormat => Get(() => DefaultPlatformTextureFormat); + /// Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies. + [Argument(Format = "-disable-assembly-updater {value}", Separator = " ")] public IReadOnlyList DisableAssemblyUpdater => Get>(() => DisableAssemblyUpdater); + /// (2018.1+) Connect to the Cache Server given by IP:port on startup, overriding any configuration stored in the Editor Preferences. Use this to connect multiple instances of Unity to different Cache Servers. + [Argument(Format = "-cacheServerIPAddress {value}")] public string CacheServerIPAddress => Get(() => CacheServerIPAddress); + /// (2018.1+) Disables the Unity Package Manager. + [Argument(Format = "-noUpm")] public bool? NoUpm => Get(() => NoUpm); + /// (2017.2+) Use this command line option to specify that APIUpdater should run when Unity is launched in batch mode. Omitting this command line argument when launching Unity in batch mode results in APIUpdater not running which can lead to compiler errors. Note that in versions prior to 2017.2 there’s no way to not run APIUpdater when Unity is launched in batch mode. + [Argument(Format = "-accept-apiupdate")] public bool? AcceptApiUpdate => Get(() => AcceptApiUpdate); + /// Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs. + [Argument(Format = "{value}", Separator = " ")] public IReadOnlyList CustomArguments => Get>(() => CustomArguments); + /// Detailed debugging feature. StackTraceLogging allows you to allow detailed logging. + [Argument(Format = "-stackTraceLogType {value}")] public UnityStackTraceLogType StackTraceLogType => Get(() => StackTraceLogType); + /// Specify the path of the unity project. + [Argument(Format = "-projectPath {value}")] public string ProjectPath => Get(() => ProjectPath); } #endregion #region UnityCreateManualActivationFileSettingsExtensions -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] public static partial class UnityCreateManualActivationFileSettingsExtensions { #region Username - /// - ///

Sets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetUsername(this T toolSettings, string username) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = username; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetUsername(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Username))] + public static T SetUsername(this T o, string v) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.Username, v)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Username))] + public static T ResetUsername(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Remove(() => o.Username)); #endregion #region Password - /// - ///

Sets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetPassword(this T toolSettings, [Secret] string password) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = password; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetPassword(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Password))] + public static T SetPassword(this T o, [Secret] string v) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.Password, v)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Password))] + public static T ResetPassword(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Remove(() => o.Password)); #endregion #region Serial - /// - ///

Sets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T SetSerial(this T toolSettings, [Secret] string serial) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = serial; - return toolSettings; - } - /// - ///

Resets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T ResetSerial(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Serial))] + public static T SetSerial(this T o, [Secret] string v) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.Serial, v)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Serial))] + public static T ResetSerial(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Remove(() => o.Serial)); #endregion #region BatchMode - /// - ///

Sets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T SetBatchMode(this T toolSettings, bool? batchMode) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = batchMode; - return toolSettings; - } - /// - ///

Resets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ResetBatchMode(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = null; - return toolSettings; - } - /// - ///

Enables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T EnableBatchMode(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = true; - return toolSettings; - } - /// - ///

Disables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T DisableBatchMode(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ToggleBatchMode(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = !toolSettings.BatchMode; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.BatchMode))] + public static T SetBatchMode(this T o, bool? v) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.BatchMode, v)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.BatchMode))] + public static T ResetBatchMode(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Remove(() => o.BatchMode)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.BatchMode))] + public static T EnableBatchMode(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.BatchMode, true)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.BatchMode))] + public static T DisableBatchMode(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.BatchMode, false)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.BatchMode))] + public static T ToggleBatchMode(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.BatchMode, !o.BatchMode)); #endregion #region SilentCrashes - /// - ///

Sets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T SetSilentCrashes(this T toolSettings, bool? silentCrashes) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = silentCrashes; - return toolSettings; - } - /// - ///

Resets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ResetSilentCrashes(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = null; - return toolSettings; - } - /// - ///

Enables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T EnableSilentCrashes(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = true; - return toolSettings; - } - /// - ///

Disables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T DisableSilentCrashes(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ToggleSilentCrashes(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = !toolSettings.SilentCrashes; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.SilentCrashes))] + public static T SetSilentCrashes(this T o, bool? v) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, v)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.SilentCrashes))] + public static T ResetSilentCrashes(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Remove(() => o.SilentCrashes)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.SilentCrashes))] + public static T EnableSilentCrashes(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, true)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.SilentCrashes))] + public static T DisableSilentCrashes(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, false)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.SilentCrashes))] + public static T ToggleSilentCrashes(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, !o.SilentCrashes)); #endregion #region NoGraphics - /// - ///

Sets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T SetNoGraphics(this T toolSettings, bool? noGraphics) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = noGraphics; - return toolSettings; - } - /// - ///

Resets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ResetNoGraphics(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = null; - return toolSettings; - } - /// - ///

Enables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T EnableNoGraphics(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = true; - return toolSettings; - } - /// - ///

Disables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T DisableNoGraphics(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = false; - return toolSettings; - } - /// - ///

Toggles

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ToggleNoGraphics(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = !toolSettings.NoGraphics; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.NoGraphics))] + public static T SetNoGraphics(this T o, bool? v) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, v)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.NoGraphics))] + public static T ResetNoGraphics(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Remove(() => o.NoGraphics)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.NoGraphics))] + public static T EnableNoGraphics(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, true)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.NoGraphics))] + public static T DisableNoGraphics(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, false)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.NoGraphics))] + public static T ToggleNoGraphics(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, !o.NoGraphics)); #endregion #region Quit - /// - ///

Sets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T SetQuit(this T toolSettings, bool? quit) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = quit; - return toolSettings; - } - /// - ///

Resets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ResetQuit(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = null; - return toolSettings; - } - /// - ///

Enables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T EnableQuit(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = true; - return toolSettings; - } - /// - ///

Disables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T DisableQuit(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ToggleQuit(this T toolSettings) where T : UnityCreateManualActivationFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = !toolSettings.Quit; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Quit))] + public static T SetQuit(this T o, bool? v) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.Quit, v)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Quit))] + public static T ResetQuit(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Remove(() => o.Quit)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Quit))] + public static T EnableQuit(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.Quit, true)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Quit))] + public static T DisableQuit(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.Quit, false)); + /// + [Pure] [Builder(Type = typeof(UnityCreateManualActivationFileSettings), Property = nameof(UnityCreateManualActivationFileSettings.Quit))] + public static T ToggleQuit(this T o) where T : UnityCreateManualActivationFileSettings => o.Modify(b => b.Set(() => o.Quit, !o.Quit)); #endregion } #endregion #region UnityManualLicenseFileSettingsExtensions -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] public static partial class UnityManualLicenseFileSettingsExtensions { #region LicenseFile - /// - ///

Sets

- ///

The path to the license file.

- ///
- [Pure] - public static T SetLicenseFile(this T toolSettings, string licenseFile) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.LicenseFile = licenseFile; - return toolSettings; - } - /// - ///

Resets

- ///

The path to the license file.

- ///
- [Pure] - public static T ResetLicenseFile(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.LicenseFile = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.LicenseFile))] + public static T SetLicenseFile(this T o, string v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.LicenseFile, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.LicenseFile))] + public static T ResetLicenseFile(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.LicenseFile)); #endregion #region Username - /// - ///

Sets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetUsername(this T toolSettings, string username) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = username; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetUsername(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Username))] + public static T SetUsername(this T o, string v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.Username, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Username))] + public static T ResetUsername(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.Username)); #endregion #region Password - /// - ///

Sets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetPassword(this T toolSettings, [Secret] string password) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = password; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetPassword(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Password))] + public static T SetPassword(this T o, [Secret] string v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.Password, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Password))] + public static T ResetPassword(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.Password)); #endregion #region Serial - /// - ///

Sets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T SetSerial(this T toolSettings, [Secret] string serial) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = serial; - return toolSettings; - } - /// - ///

Resets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T ResetSerial(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Serial))] + public static T SetSerial(this T o, [Secret] string v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.Serial, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Serial))] + public static T ResetSerial(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.Serial)); #endregion #region BatchMode - /// - ///

Sets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T SetBatchMode(this T toolSettings, bool? batchMode) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = batchMode; - return toolSettings; - } - /// - ///

Resets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ResetBatchMode(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = null; - return toolSettings; - } - /// - ///

Enables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T EnableBatchMode(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = true; - return toolSettings; - } - /// - ///

Disables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T DisableBatchMode(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ToggleBatchMode(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = !toolSettings.BatchMode; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.BatchMode))] + public static T SetBatchMode(this T o, bool? v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.BatchMode, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.BatchMode))] + public static T ResetBatchMode(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.BatchMode)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.BatchMode))] + public static T EnableBatchMode(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.BatchMode, true)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.BatchMode))] + public static T DisableBatchMode(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.BatchMode, false)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.BatchMode))] + public static T ToggleBatchMode(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.BatchMode, !o.BatchMode)); #endregion #region SilentCrashes - /// - ///

Sets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T SetSilentCrashes(this T toolSettings, bool? silentCrashes) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = silentCrashes; - return toolSettings; - } - /// - ///

Resets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ResetSilentCrashes(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = null; - return toolSettings; - } - /// - ///

Enables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T EnableSilentCrashes(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = true; - return toolSettings; - } - /// - ///

Disables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T DisableSilentCrashes(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ToggleSilentCrashes(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = !toolSettings.SilentCrashes; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.SilentCrashes))] + public static T SetSilentCrashes(this T o, bool? v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.SilentCrashes))] + public static T ResetSilentCrashes(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.SilentCrashes)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.SilentCrashes))] + public static T EnableSilentCrashes(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, true)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.SilentCrashes))] + public static T DisableSilentCrashes(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, false)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.SilentCrashes))] + public static T ToggleSilentCrashes(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.SilentCrashes, !o.SilentCrashes)); #endregion #region NoGraphics - /// - ///

Sets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T SetNoGraphics(this T toolSettings, bool? noGraphics) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = noGraphics; - return toolSettings; - } - /// - ///

Resets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ResetNoGraphics(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = null; - return toolSettings; - } - /// - ///

Enables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T EnableNoGraphics(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = true; - return toolSettings; - } - /// - ///

Disables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T DisableNoGraphics(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = false; - return toolSettings; - } - /// - ///

Toggles

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ToggleNoGraphics(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = !toolSettings.NoGraphics; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.NoGraphics))] + public static T SetNoGraphics(this T o, bool? v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.NoGraphics))] + public static T ResetNoGraphics(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.NoGraphics)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.NoGraphics))] + public static T EnableNoGraphics(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, true)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.NoGraphics))] + public static T DisableNoGraphics(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, false)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.NoGraphics))] + public static T ToggleNoGraphics(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.NoGraphics, !o.NoGraphics)); #endregion #region Quit - /// - ///

Sets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T SetQuit(this T toolSettings, bool? quit) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = quit; - return toolSettings; - } - /// - ///

Resets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ResetQuit(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = null; - return toolSettings; - } - /// - ///

Enables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T EnableQuit(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = true; - return toolSettings; - } - /// - ///

Disables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T DisableQuit(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ToggleQuit(this T toolSettings) where T : UnityManualLicenseFileSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = !toolSettings.Quit; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Quit))] + public static T SetQuit(this T o, bool? v) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.Quit, v)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Quit))] + public static T ResetQuit(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Remove(() => o.Quit)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Quit))] + public static T EnableQuit(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.Quit, true)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Quit))] + public static T DisableQuit(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.Quit, false)); + /// + [Pure] [Builder(Type = typeof(UnityManualLicenseFileSettings), Property = nameof(UnityManualLicenseFileSettings.Quit))] + public static T ToggleQuit(this T o) where T : UnityManualLicenseFileSettings => o.Modify(b => b.Set(() => o.Quit, !o.Quit)); #endregion } #endregion #region UnitySettingsExtensions -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] public static partial class UnitySettingsExtensions { #region BuildLinux32Player - /// - ///

Sets

- ///

Build a 32-bit standalone Linux player (for example, -buildLinux32Player path/to/your/build).

- ///
- [Pure] - public static T SetBuildLinux32Player(this T toolSettings, string buildLinux32Player) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildLinux32Player = buildLinux32Player; - return toolSettings; - } - /// - ///

Resets

- ///

Build a 32-bit standalone Linux player (for example, -buildLinux32Player path/to/your/build).

- ///
- [Pure] - public static T ResetBuildLinux32Player(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildLinux32Player = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildLinux32Player))] + public static T SetBuildLinux32Player(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildLinux32Player, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildLinux32Player))] + public static T ResetBuildLinux32Player(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildLinux32Player)); #endregion #region BuildLinux64Player - /// - ///

Sets

- ///

Build a 64-bit standalone Linux player (for example, -buildLinux64Player path/to/your/build).

- ///
- [Pure] - public static T SetBuildLinux64Player(this T toolSettings, string buildLinux64Player) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildLinux64Player = buildLinux64Player; - return toolSettings; - } - /// - ///

Resets

- ///

Build a 64-bit standalone Linux player (for example, -buildLinux64Player path/to/your/build).

- ///
- [Pure] - public static T ResetBuildLinux64Player(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildLinux64Player = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildLinux64Player))] + public static T SetBuildLinux64Player(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildLinux64Player, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildLinux64Player))] + public static T ResetBuildLinux64Player(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildLinux64Player)); #endregion #region BuildLinuxUniversalPlayer - /// - ///

Sets

- ///

Build a combined 32-bit and 64-bit standalone Linux player (for example, -buildLinuxUniversalPlayer path/to/your/build).

- ///
- [Pure] - public static T SetBuildLinuxUniversalPlayer(this T toolSettings, string buildLinuxUniversalPlayer) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildLinuxUniversalPlayer = buildLinuxUniversalPlayer; - return toolSettings; - } - /// - ///

Resets

- ///

Build a combined 32-bit and 64-bit standalone Linux player (for example, -buildLinuxUniversalPlayer path/to/your/build).

- ///
- [Pure] - public static T ResetBuildLinuxUniversalPlayer(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildLinuxUniversalPlayer = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildLinuxUniversalPlayer))] + public static T SetBuildLinuxUniversalPlayer(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildLinuxUniversalPlayer, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildLinuxUniversalPlayer))] + public static T ResetBuildLinuxUniversalPlayer(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildLinuxUniversalPlayer)); #endregion #region BuildOSXPlayer - /// - ///

Sets

- ///

Build a 32-bit standalone Mac OSX player (for example, -buildOSXPlayer path/to/your/build.app).

- ///
- [Pure] - public static T SetBuildOSXPlayer(this T toolSettings, string buildOSXPlayer) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildOSXPlayer = buildOSXPlayer; - return toolSettings; - } - /// - ///

Resets

- ///

Build a 32-bit standalone Mac OSX player (for example, -buildOSXPlayer path/to/your/build.app).

- ///
- [Pure] - public static T ResetBuildOSXPlayer(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildOSXPlayer = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildOSXPlayer))] + public static T SetBuildOSXPlayer(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildOSXPlayer, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildOSXPlayer))] + public static T ResetBuildOSXPlayer(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildOSXPlayer)); #endregion #region BuildOSX64Player - /// - ///

Sets

- ///

Build a 64-bit standalone Mac OSX player (for example, -buildOSX64Player path/to/your/build.app).

- ///
- [Pure] - public static T SetBuildOSX64Player(this T toolSettings, string buildOSX64Player) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildOSX64Player = buildOSX64Player; - return toolSettings; - } - /// - ///

Resets

- ///

Build a 64-bit standalone Mac OSX player (for example, -buildOSX64Player path/to/your/build.app).

- ///
- [Pure] - public static T ResetBuildOSX64Player(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildOSX64Player = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildOSX64Player))] + public static T SetBuildOSX64Player(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildOSX64Player, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildOSX64Player))] + public static T ResetBuildOSX64Player(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildOSX64Player)); #endregion #region BuildOSXUniversalPlayer - /// - ///

Sets

- ///

Build a combined 32-bit and 64-bit standalone Mac OSX player (for example, -buildOSXUniversalPlayer path/to/your/build.app).

- ///
- [Pure] - public static T SetBuildOSXUniversalPlayer(this T toolSettings, string buildOSXUniversalPlayer) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildOSXUniversalPlayer = buildOSXUniversalPlayer; - return toolSettings; - } - /// - ///

Resets

- ///

Build a combined 32-bit and 64-bit standalone Mac OSX player (for example, -buildOSXUniversalPlayer path/to/your/build.app).

- ///
- [Pure] - public static T ResetBuildOSXUniversalPlayer(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildOSXUniversalPlayer = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildOSXUniversalPlayer))] + public static T SetBuildOSXUniversalPlayer(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildOSXUniversalPlayer, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildOSXUniversalPlayer))] + public static T ResetBuildOSXUniversalPlayer(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildOSXUniversalPlayer)); #endregion #region BuildWindowsPlayer - /// - ///

Sets

- ///

Build a 32-bit standalone Windows player (for example, -buildWindowsPlayer path/to/your/build.exe).

- ///
- [Pure] - public static T SetBuildWindowsPlayer(this T toolSettings, string buildWindowsPlayer) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildWindowsPlayer = buildWindowsPlayer; - return toolSettings; - } - /// - ///

Resets

- ///

Build a 32-bit standalone Windows player (for example, -buildWindowsPlayer path/to/your/build.exe).

- ///
- [Pure] - public static T ResetBuildWindowsPlayer(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildWindowsPlayer = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildWindowsPlayer))] + public static T SetBuildWindowsPlayer(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildWindowsPlayer, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildWindowsPlayer))] + public static T ResetBuildWindowsPlayer(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildWindowsPlayer)); #endregion #region BuildWindows64Player - /// - ///

Sets

- ///

Build a 64-bit standalone Windows player (for example, -buildWindows64Player path/to/your/build.exe).

- ///
- [Pure] - public static T SetBuildWindows64Player(this T toolSettings, string buildWindows64Player) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildWindows64Player = buildWindows64Player; - return toolSettings; - } - /// - ///

Resets

- ///

Build a 64-bit standalone Windows player (for example, -buildWindows64Player path/to/your/build.exe).

- ///
- [Pure] - public static T ResetBuildWindows64Player(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildWindows64Player = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildWindows64Player))] + public static T SetBuildWindows64Player(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BuildWindows64Player, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BuildWindows64Player))] + public static T ResetBuildWindows64Player(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BuildWindows64Player)); #endregion #region CreateProject - /// - ///

Sets

- ///

Create an empty project at the given path.

- ///
- [Pure] - public static T SetCreateProject(this T toolSettings, string createProject) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CreateProject = createProject; - return toolSettings; - } - /// - ///

Resets

- ///

Create an empty project at the given path.

- ///
- [Pure] - public static T ResetCreateProject(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CreateProject = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.CreateProject))] + public static T SetCreateProject(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.CreateProject, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.CreateProject))] + public static T ResetCreateProject(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.CreateProject)); #endregion #region ExecuteMethod - /// - ///

Sets

- ///

Execute the static method as soon as Unity is started, the project is open and after the optional Asset server update has been performed. This can be used to do tasks such as continous integration, performing Unit Tests, making builds or preparing data. To return an error from the command line process, either throw an exception which causes Unity to exit with return code 1, or call EditorApplication.Exit with a non-zero return code.To use ExecuteMethod, you need to place the enclosing script in an Editor folder. The method to be executed must be defined as static.

- ///
- [Pure] - public static T SetExecuteMethod(this T toolSettings, string executeMethod) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ExecuteMethod = executeMethod; - return toolSettings; - } - /// - ///

Resets

- ///

Execute the static method as soon as Unity is started, the project is open and after the optional Asset server update has been performed. This can be used to do tasks such as continous integration, performing Unit Tests, making builds or preparing data. To return an error from the command line process, either throw an exception which causes Unity to exit with return code 1, or call EditorApplication.Exit with a non-zero return code.To use ExecuteMethod, you need to place the enclosing script in an Editor folder. The method to be executed must be defined as static.

- ///
- [Pure] - public static T ResetExecuteMethod(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ExecuteMethod = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExecuteMethod))] + public static T SetExecuteMethod(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.ExecuteMethod, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExecuteMethod))] + public static T ResetExecuteMethod(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.ExecuteMethod)); #endregion #region ImportPackage - /// - ///

Sets

- ///

Import the given package. No import dialog is shown.

- ///
- [Pure] - public static T SetImportPackage(this T toolSettings, string importPackage) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ImportPackage = importPackage; - return toolSettings; - } - /// - ///

Resets

- ///

Import the given package. No import dialog is shown.

- ///
- [Pure] - public static T ResetImportPackage(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ImportPackage = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ImportPackage))] + public static T SetImportPackage(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.ImportPackage, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ImportPackage))] + public static T ResetImportPackage(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.ImportPackage)); #endregion #region RunEditorTests - /// - ///

Sets

- ///

Run Editor tests from the project. This argument requires the projectPath, and it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///
- [Pure] - public static T SetRunEditorTests(this T toolSettings, bool? runEditorTests) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.RunEditorTests = runEditorTests; - return toolSettings; - } - /// - ///

Resets

- ///

Run Editor tests from the project. This argument requires the projectPath, and it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///
- [Pure] - public static T ResetRunEditorTests(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.RunEditorTests = null; - return toolSettings; - } - /// - ///

Enables

- ///

Run Editor tests from the project. This argument requires the projectPath, and it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///
- [Pure] - public static T EnableRunEditorTests(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.RunEditorTests = true; - return toolSettings; - } - /// - ///

Disables

- ///

Run Editor tests from the project. This argument requires the projectPath, and it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///
- [Pure] - public static T DisableRunEditorTests(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.RunEditorTests = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Run Editor tests from the project. This argument requires the projectPath, and it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished.

- ///
- [Pure] - public static T ToggleRunEditorTests(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.RunEditorTests = !toolSettings.RunEditorTests; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.RunEditorTests))] + public static T SetRunEditorTests(this T o, bool? v) where T : UnitySettings => o.Modify(b => b.Set(() => o.RunEditorTests, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.RunEditorTests))] + public static T ResetRunEditorTests(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.RunEditorTests)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.RunEditorTests))] + public static T EnableRunEditorTests(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.RunEditorTests, true)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.RunEditorTests))] + public static T DisableRunEditorTests(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.RunEditorTests, false)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.RunEditorTests))] + public static T ToggleRunEditorTests(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.RunEditorTests, !o.RunEditorTests)); #endregion #region EditorTestsCategories - /// - ///

Sets to a new list

- ///

Filter editor tests by categories.

- ///
- [Pure] - public static T SetEditorTestsCategories(this T toolSettings, params string[] editorTestsCategories) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsCategoriesInternal = editorTestsCategories.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

Filter editor tests by categories.

- ///
- [Pure] - public static T SetEditorTestsCategories(this T toolSettings, IEnumerable editorTestsCategories) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsCategoriesInternal = editorTestsCategories.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

Filter editor tests by categories.

- ///
- [Pure] - public static T AddEditorTestsCategories(this T toolSettings, params string[] editorTestsCategories) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsCategoriesInternal.AddRange(editorTestsCategories); - return toolSettings; - } - /// - ///

Adds values to

- ///

Filter editor tests by categories.

- ///
- [Pure] - public static T AddEditorTestsCategories(this T toolSettings, IEnumerable editorTestsCategories) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsCategoriesInternal.AddRange(editorTestsCategories); - return toolSettings; - } - /// - ///

Clears

- ///

Filter editor tests by categories.

- ///
- [Pure] - public static T ClearEditorTestsCategories(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsCategoriesInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

Filter editor tests by categories.

- ///
- [Pure] - public static T RemoveEditorTestsCategories(this T toolSettings, params string[] editorTestsCategories) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(editorTestsCategories); - toolSettings.EditorTestsCategoriesInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

Filter editor tests by categories.

- ///
- [Pure] - public static T RemoveEditorTestsCategories(this T toolSettings, IEnumerable editorTestsCategories) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(editorTestsCategories); - toolSettings.EditorTestsCategoriesInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsCategories))] + public static T SetEditorTestsCategories(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.Set(() => o.EditorTestsCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsCategories))] + public static T SetEditorTestsCategories(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.Set(() => o.EditorTestsCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsCategories))] + public static T AddEditorTestsCategories(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.AddCollection(() => o.EditorTestsCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsCategories))] + public static T AddEditorTestsCategories(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.AddCollection(() => o.EditorTestsCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsCategories))] + public static T RemoveEditorTestsCategories(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.RemoveCollection(() => o.EditorTestsCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsCategories))] + public static T RemoveEditorTestsCategories(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.RemoveCollection(() => o.EditorTestsCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsCategories))] + public static T ClearEditorTestsCategories(this T o) where T : UnitySettings => o.Modify(b => b.ClearCollection(() => o.EditorTestsCategories)); #endregion #region EditorTestsFilter - /// - ///

Sets to a new list

- ///

Filter editor tests by names.

- ///
- [Pure] - public static T SetEditorTestsFilter(this T toolSettings, params string[] editorTestsFilter) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsFilterInternal = editorTestsFilter.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

Filter editor tests by names.

- ///
- [Pure] - public static T SetEditorTestsFilter(this T toolSettings, IEnumerable editorTestsFilter) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsFilterInternal = editorTestsFilter.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

Filter editor tests by names.

- ///
- [Pure] - public static T AddEditorTestsFilter(this T toolSettings, params string[] editorTestsFilter) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsFilterInternal.AddRange(editorTestsFilter); - return toolSettings; - } - /// - ///

Adds values to

- ///

Filter editor tests by names.

- ///
- [Pure] - public static T AddEditorTestsFilter(this T toolSettings, IEnumerable editorTestsFilter) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsFilterInternal.AddRange(editorTestsFilter); - return toolSettings; - } - /// - ///

Clears

- ///

Filter editor tests by names.

- ///
- [Pure] - public static T ClearEditorTestsFilter(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsFilterInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

Filter editor tests by names.

- ///
- [Pure] - public static T RemoveEditorTestsFilter(this T toolSettings, params string[] editorTestsFilter) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(editorTestsFilter); - toolSettings.EditorTestsFilterInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

Filter editor tests by names.

- ///
- [Pure] - public static T RemoveEditorTestsFilter(this T toolSettings, IEnumerable editorTestsFilter) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(editorTestsFilter); - toolSettings.EditorTestsFilterInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsFilter))] + public static T SetEditorTestsFilter(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.Set(() => o.EditorTestsFilter, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsFilter))] + public static T SetEditorTestsFilter(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.Set(() => o.EditorTestsFilter, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsFilter))] + public static T AddEditorTestsFilter(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.AddCollection(() => o.EditorTestsFilter, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsFilter))] + public static T AddEditorTestsFilter(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.AddCollection(() => o.EditorTestsFilter, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsFilter))] + public static T RemoveEditorTestsFilter(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.RemoveCollection(() => o.EditorTestsFilter, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsFilter))] + public static T RemoveEditorTestsFilter(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.RemoveCollection(() => o.EditorTestsFilter, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsFilter))] + public static T ClearEditorTestsFilter(this T o) where T : UnitySettings => o.Modify(b => b.ClearCollection(() => o.EditorTestsFilter)); #endregion #region EditorTestsResultFile - /// - ///

Sets

- ///

Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder.

- ///
- [Pure] - public static T SetEditorTestsResultFile(this T toolSettings, string editorTestsResultFile) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsResultFile = editorTestsResultFile; - return toolSettings; - } - /// - ///

Resets

- ///

Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder.

- ///
- [Pure] - public static T ResetEditorTestsResultFile(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.EditorTestsResultFile = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsResultFile))] + public static T SetEditorTestsResultFile(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.EditorTestsResultFile, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.EditorTestsResultFile))] + public static T ResetEditorTestsResultFile(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.EditorTestsResultFile)); #endregion #region ExportPackage - /// - ///

Sets to a new list

- ///

Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument.

- ///
- [Pure] - public static T SetExportPackage(this T toolSettings, params string[] exportPackage) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ExportPackageInternal = exportPackage.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument.

- ///
- [Pure] - public static T SetExportPackage(this T toolSettings, IEnumerable exportPackage) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ExportPackageInternal = exportPackage.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument.

- ///
- [Pure] - public static T AddExportPackage(this T toolSettings, params string[] exportPackage) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ExportPackageInternal.AddRange(exportPackage); - return toolSettings; - } - /// - ///

Adds values to

- ///

Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument.

- ///
- [Pure] - public static T AddExportPackage(this T toolSettings, IEnumerable exportPackage) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ExportPackageInternal.AddRange(exportPackage); - return toolSettings; - } - /// - ///

Clears

- ///

Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument.

- ///
- [Pure] - public static T ClearExportPackage(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ExportPackageInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument.

- ///
- [Pure] - public static T RemoveExportPackage(this T toolSettings, params string[] exportPackage) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(exportPackage); - toolSettings.ExportPackageInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

Export a package, given a path (or set of given paths).-exportPackage <exportAssetPath> <exportFileName> In this example exportAssetPath is a folder (relative to to the Unity project root) to export from the Unity project, and exportFileName is the package name. Currently, this option only exports whole folders at a time. You normally need to use this command with the -projectPath argument.

- ///
- [Pure] - public static T RemoveExportPackage(this T toolSettings, IEnumerable exportPackage) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(exportPackage); - toolSettings.ExportPackageInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExportPackage))] + public static T SetExportPackage(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.Set(() => o.ExportPackage, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExportPackage))] + public static T SetExportPackage(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.Set(() => o.ExportPackage, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExportPackage))] + public static T AddExportPackage(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.AddCollection(() => o.ExportPackage, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExportPackage))] + public static T AddExportPackage(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.AddCollection(() => o.ExportPackage, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExportPackage))] + public static T RemoveExportPackage(this T o, params string[] v) where T : UnitySettings => o.Modify(b => b.RemoveCollection(() => o.ExportPackage, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExportPackage))] + public static T RemoveExportPackage(this T o, IEnumerable v) where T : UnitySettings => o.Modify(b => b.RemoveCollection(() => o.ExportPackage, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.ExportPackage))] + public static T ClearExportPackage(this T o) where T : UnitySettings => o.Modify(b => b.ClearCollection(() => o.ExportPackage)); #endregion #region Username - /// - ///

Sets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetUsername(this T toolSettings, string username) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = username; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetUsername(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Username))] + public static T SetUsername(this T o, string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.Username, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Username))] + public static T ResetUsername(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.Username)); #endregion #region Password - /// - ///

Sets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetPassword(this T toolSettings, [Secret] string password) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = password; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetPassword(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Password))] + public static T SetPassword(this T o, [Secret] string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.Password, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Password))] + public static T ResetPassword(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.Password)); #endregion #region Serial - /// - ///

Sets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T SetSerial(this T toolSettings, [Secret] string serial) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = serial; - return toolSettings; - } - /// - ///

Resets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T ResetSerial(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Serial))] + public static T SetSerial(this T o, [Secret] string v) where T : UnitySettings => o.Modify(b => b.Set(() => o.Serial, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Serial))] + public static T ResetSerial(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.Serial)); #endregion #region BatchMode - /// - ///

Sets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T SetBatchMode(this T toolSettings, bool? batchMode) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = batchMode; - return toolSettings; - } - /// - ///

Resets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ResetBatchMode(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = null; - return toolSettings; - } - /// - ///

Enables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T EnableBatchMode(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = true; - return toolSettings; - } - /// - ///

Disables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T DisableBatchMode(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ToggleBatchMode(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = !toolSettings.BatchMode; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BatchMode))] + public static T SetBatchMode(this T o, bool? v) where T : UnitySettings => o.Modify(b => b.Set(() => o.BatchMode, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BatchMode))] + public static T ResetBatchMode(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.BatchMode)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BatchMode))] + public static T EnableBatchMode(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.BatchMode, true)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BatchMode))] + public static T DisableBatchMode(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.BatchMode, false)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.BatchMode))] + public static T ToggleBatchMode(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.BatchMode, !o.BatchMode)); #endregion #region SilentCrashes - /// - ///

Sets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T SetSilentCrashes(this T toolSettings, bool? silentCrashes) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = silentCrashes; - return toolSettings; - } - /// - ///

Resets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ResetSilentCrashes(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = null; - return toolSettings; - } - /// - ///

Enables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T EnableSilentCrashes(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = true; - return toolSettings; - } - /// - ///

Disables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T DisableSilentCrashes(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ToggleSilentCrashes(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = !toolSettings.SilentCrashes; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.SilentCrashes))] + public static T SetSilentCrashes(this T o, bool? v) where T : UnitySettings => o.Modify(b => b.Set(() => o.SilentCrashes, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.SilentCrashes))] + public static T ResetSilentCrashes(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.SilentCrashes)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.SilentCrashes))] + public static T EnableSilentCrashes(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.SilentCrashes, true)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.SilentCrashes))] + public static T DisableSilentCrashes(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.SilentCrashes, false)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.SilentCrashes))] + public static T ToggleSilentCrashes(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.SilentCrashes, !o.SilentCrashes)); #endregion #region NoGraphics - /// - ///

Sets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T SetNoGraphics(this T toolSettings, bool? noGraphics) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = noGraphics; - return toolSettings; - } - /// - ///

Resets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ResetNoGraphics(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = null; - return toolSettings; - } - /// - ///

Enables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T EnableNoGraphics(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = true; - return toolSettings; - } - /// - ///

Disables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T DisableNoGraphics(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = false; - return toolSettings; - } - /// - ///

Toggles

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ToggleNoGraphics(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = !toolSettings.NoGraphics; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.NoGraphics))] + public static T SetNoGraphics(this T o, bool? v) where T : UnitySettings => o.Modify(b => b.Set(() => o.NoGraphics, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.NoGraphics))] + public static T ResetNoGraphics(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.NoGraphics)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.NoGraphics))] + public static T EnableNoGraphics(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.NoGraphics, true)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.NoGraphics))] + public static T DisableNoGraphics(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.NoGraphics, false)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.NoGraphics))] + public static T ToggleNoGraphics(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.NoGraphics, !o.NoGraphics)); #endregion #region Quit - /// - ///

Sets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T SetQuit(this T toolSettings, bool? quit) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = quit; - return toolSettings; - } - /// - ///

Resets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ResetQuit(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = null; - return toolSettings; - } - /// - ///

Enables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T EnableQuit(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = true; - return toolSettings; - } - /// - ///

Disables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T DisableQuit(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ToggleQuit(this T toolSettings) where T : UnitySettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = !toolSettings.Quit; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Quit))] + public static T SetQuit(this T o, bool? v) where T : UnitySettings => o.Modify(b => b.Set(() => o.Quit, v)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Quit))] + public static T ResetQuit(this T o) where T : UnitySettings => o.Modify(b => b.Remove(() => o.Quit)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Quit))] + public static T EnableQuit(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.Quit, true)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Quit))] + public static T DisableQuit(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.Quit, false)); + /// + [Pure] [Builder(Type = typeof(UnitySettings), Property = nameof(UnitySettings.Quit))] + public static T ToggleQuit(this T o) where T : UnitySettings => o.Modify(b => b.Set(() => o.Quit, !o.Quit)); #endregion } #endregion #region UnityReturnLicenseSettingsExtensions -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] public static partial class UnityReturnLicenseSettingsExtensions { #region Username - /// - ///

Sets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetUsername(this T toolSettings, string username) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = username; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetUsername(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Username))] + public static T SetUsername(this T o, string v) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.Username, v)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Username))] + public static T ResetUsername(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Remove(() => o.Username)); #endregion #region Password - /// - ///

Sets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetPassword(this T toolSettings, [Secret] string password) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = password; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetPassword(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Password))] + public static T SetPassword(this T o, [Secret] string v) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.Password, v)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Password))] + public static T ResetPassword(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Remove(() => o.Password)); #endregion #region Serial - /// - ///

Sets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T SetSerial(this T toolSettings, [Secret] string serial) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = serial; - return toolSettings; - } - /// - ///

Resets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T ResetSerial(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Serial))] + public static T SetSerial(this T o, [Secret] string v) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.Serial, v)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Serial))] + public static T ResetSerial(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Remove(() => o.Serial)); #endregion #region BatchMode - /// - ///

Sets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T SetBatchMode(this T toolSettings, bool? batchMode) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = batchMode; - return toolSettings; - } - /// - ///

Resets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ResetBatchMode(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = null; - return toolSettings; - } - /// - ///

Enables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T EnableBatchMode(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = true; - return toolSettings; - } - /// - ///

Disables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T DisableBatchMode(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ToggleBatchMode(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = !toolSettings.BatchMode; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.BatchMode))] + public static T SetBatchMode(this T o, bool? v) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.BatchMode, v)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.BatchMode))] + public static T ResetBatchMode(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Remove(() => o.BatchMode)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.BatchMode))] + public static T EnableBatchMode(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.BatchMode, true)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.BatchMode))] + public static T DisableBatchMode(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.BatchMode, false)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.BatchMode))] + public static T ToggleBatchMode(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.BatchMode, !o.BatchMode)); #endregion #region SilentCrashes - /// - ///

Sets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T SetSilentCrashes(this T toolSettings, bool? silentCrashes) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = silentCrashes; - return toolSettings; - } - /// - ///

Resets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ResetSilentCrashes(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = null; - return toolSettings; - } - /// - ///

Enables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T EnableSilentCrashes(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = true; - return toolSettings; - } - /// - ///

Disables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T DisableSilentCrashes(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ToggleSilentCrashes(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = !toolSettings.SilentCrashes; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.SilentCrashes))] + public static T SetSilentCrashes(this T o, bool? v) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.SilentCrashes, v)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.SilentCrashes))] + public static T ResetSilentCrashes(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Remove(() => o.SilentCrashes)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.SilentCrashes))] + public static T EnableSilentCrashes(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.SilentCrashes, true)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.SilentCrashes))] + public static T DisableSilentCrashes(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.SilentCrashes, false)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.SilentCrashes))] + public static T ToggleSilentCrashes(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.SilentCrashes, !o.SilentCrashes)); #endregion #region NoGraphics - /// - ///

Sets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T SetNoGraphics(this T toolSettings, bool? noGraphics) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = noGraphics; - return toolSettings; - } - /// - ///

Resets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ResetNoGraphics(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = null; - return toolSettings; - } - /// - ///

Enables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T EnableNoGraphics(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = true; - return toolSettings; - } - /// - ///

Disables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T DisableNoGraphics(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = false; - return toolSettings; - } - /// - ///

Toggles

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ToggleNoGraphics(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = !toolSettings.NoGraphics; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.NoGraphics))] + public static T SetNoGraphics(this T o, bool? v) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.NoGraphics, v)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.NoGraphics))] + public static T ResetNoGraphics(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Remove(() => o.NoGraphics)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.NoGraphics))] + public static T EnableNoGraphics(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.NoGraphics, true)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.NoGraphics))] + public static T DisableNoGraphics(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.NoGraphics, false)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.NoGraphics))] + public static T ToggleNoGraphics(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.NoGraphics, !o.NoGraphics)); #endregion #region Quit - /// - ///

Sets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T SetQuit(this T toolSettings, bool? quit) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = quit; - return toolSettings; - } - /// - ///

Resets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ResetQuit(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = null; - return toolSettings; - } - /// - ///

Enables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T EnableQuit(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = true; - return toolSettings; - } - /// - ///

Disables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T DisableQuit(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ToggleQuit(this T toolSettings) where T : UnityReturnLicenseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = !toolSettings.Quit; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Quit))] + public static T SetQuit(this T o, bool? v) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.Quit, v)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Quit))] + public static T ResetQuit(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Remove(() => o.Quit)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Quit))] + public static T EnableQuit(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.Quit, true)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Quit))] + public static T DisableQuit(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.Quit, false)); + /// + [Pure] [Builder(Type = typeof(UnityReturnLicenseSettings), Property = nameof(UnityReturnLicenseSettings.Quit))] + public static T ToggleQuit(this T o) where T : UnityReturnLicenseSettings => o.Modify(b => b.Set(() => o.Quit, !o.Quit)); #endregion } #endregion #region UnityRunTestsSettingsExtensions -/// -/// Used within . -/// +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] public static partial class UnityRunTestsSettingsExtensions { #region TestCategories - /// - ///

Sets to a new list

- ///

A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run.

- ///
- [Pure] - public static T SetTestCategories(this T toolSettings, params string[] testCategories) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestCategoriesInternal = testCategories.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run.

- ///
- [Pure] - public static T SetTestCategories(this T toolSettings, IEnumerable testCategories) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestCategoriesInternal = testCategories.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run.

- ///
- [Pure] - public static T AddTestCategories(this T toolSettings, params string[] testCategories) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestCategoriesInternal.AddRange(testCategories); - return toolSettings; - } - /// - ///

Adds values to

- ///

A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run.

- ///
- [Pure] - public static T AddTestCategories(this T toolSettings, IEnumerable testCategories) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestCategoriesInternal.AddRange(testCategories); - return toolSettings; - } - /// - ///

Clears

- ///

A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run.

- ///
- [Pure] - public static T ClearTestCategories(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestCategoriesInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run.

- ///
- [Pure] - public static T RemoveTestCategories(this T toolSettings, params string[] testCategories) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(testCategories); - toolSettings.TestCategoriesInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

A list of test categories to include in the run, or a regular expression pattern to match category names. If using both TestFilters and TestCategories, then only tests that match both are run. This argument supports negation using '!'. If using '!MyCategory' then no tests with the 'MyCategory' category will be included in the run.

- ///
- [Pure] - public static T RemoveTestCategories(this T toolSettings, IEnumerable testCategories) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(testCategories); - toolSettings.TestCategoriesInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestCategories))] + public static T SetTestCategories(this T o, params string[] v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.TestCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestCategories))] + public static T SetTestCategories(this T o, IEnumerable v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.TestCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestCategories))] + public static T AddTestCategories(this T o, params string[] v) where T : UnityRunTestsSettings => o.Modify(b => b.AddCollection(() => o.TestCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestCategories))] + public static T AddTestCategories(this T o, IEnumerable v) where T : UnityRunTestsSettings => o.Modify(b => b.AddCollection(() => o.TestCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestCategories))] + public static T RemoveTestCategories(this T o, params string[] v) where T : UnityRunTestsSettings => o.Modify(b => b.RemoveCollection(() => o.TestCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestCategories))] + public static T RemoveTestCategories(this T o, IEnumerable v) where T : UnityRunTestsSettings => o.Modify(b => b.RemoveCollection(() => o.TestCategories, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestCategories))] + public static T ClearTestCategories(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.ClearCollection(() => o.TestCategories)); #endregion #region TestFilters - /// - ///

Sets to a new list

- ///

A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'.

- ///
- [Pure] - public static T SetTestFilters(this T toolSettings, params string[] testFilters) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestFiltersInternal = testFilters.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'.

- ///
- [Pure] - public static T SetTestFilters(this T toolSettings, IEnumerable testFilters) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestFiltersInternal = testFilters.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'.

- ///
- [Pure] - public static T AddTestFilters(this T toolSettings, params string[] testFilters) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestFiltersInternal.AddRange(testFilters); - return toolSettings; - } - /// - ///

Adds values to

- ///

A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'.

- ///
- [Pure] - public static T AddTestFilters(this T toolSettings, IEnumerable testFilters) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestFiltersInternal.AddRange(testFilters); - return toolSettings; - } - /// - ///

Clears

- ///

A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'.

- ///
- [Pure] - public static T ClearTestFilters(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestFiltersInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'.

- ///
- [Pure] - public static T RemoveTestFilters(this T toolSettings, params string[] testFilters) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(testFilters); - toolSettings.TestFiltersInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

A list of test names to run, or a regular expression pattern to match tests by their full name. This argument supports negation using '!'. If using the test filter '!MyNamespace.Something.MyTest', then all tests except that test will be run. It is also possible to run a specific variation of a parameterized test like so: 'ClassName.MethodName(Param1,Param2)'.

- ///
- [Pure] - public static T RemoveTestFilters(this T toolSettings, IEnumerable testFilters) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(testFilters); - toolSettings.TestFiltersInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestFilters))] + public static T SetTestFilters(this T o, params string[] v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.TestFilters, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestFilters))] + public static T SetTestFilters(this T o, IEnumerable v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.TestFilters, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestFilters))] + public static T AddTestFilters(this T o, params string[] v) where T : UnityRunTestsSettings => o.Modify(b => b.AddCollection(() => o.TestFilters, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestFilters))] + public static T AddTestFilters(this T o, IEnumerable v) where T : UnityRunTestsSettings => o.Modify(b => b.AddCollection(() => o.TestFilters, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestFilters))] + public static T RemoveTestFilters(this T o, params string[] v) where T : UnityRunTestsSettings => o.Modify(b => b.RemoveCollection(() => o.TestFilters, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestFilters))] + public static T RemoveTestFilters(this T o, IEnumerable v) where T : UnityRunTestsSettings => o.Modify(b => b.RemoveCollection(() => o.TestFilters, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestFilters))] + public static T ClearTestFilters(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.ClearCollection(() => o.TestFilters)); #endregion #region TestResultFile - /// - ///

Sets

- ///

Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder.

- ///
- [Pure] - public static T SetTestResultFile(this T toolSettings, string testResultFile) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestResultFile = testResultFile; - return toolSettings; - } - /// - ///

Resets

- ///

Path where the result file should be placed. If the path is a folder, a default file name is used. If not specified, the results are placed in the project's root folder.

- ///
- [Pure] - public static T ResetTestResultFile(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestResultFile = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestResultFile))] + public static T SetTestResultFile(this T o, string v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.TestResultFile, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestResultFile))] + public static T ResetTestResultFile(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.TestResultFile)); #endregion #region TestPlatform - /// - ///

Sets

- ///

The platform to run tests on.

- ///
- [Pure] - public static T SetTestPlatform(this T toolSettings, string testPlatform) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestPlatform = testPlatform; - return toolSettings; - } - /// - ///

Resets

- ///

The platform to run tests on.

- ///
- [Pure] - public static T ResetTestPlatform(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.TestPlatform = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestPlatform))] + public static T SetTestPlatform(this T o, UnityTestPlatform v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.TestPlatform, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.TestPlatform))] + public static T ResetTestPlatform(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.TestPlatform)); #endregion #region Username - /// - ///

Sets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetUsername(this T toolSettings, string username) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = username; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a username into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetUsername(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Username = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Username))] + public static T SetUsername(this T o, string v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.Username, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Username))] + public static T ResetUsername(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.Username)); #endregion #region Password - /// - ///

Sets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T SetPassword(this T toolSettings, [Secret] string password) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = password; - return toolSettings; - } - /// - ///

Resets

- ///

Enter a password into the log-in form during activation of the Unity Editor.

- ///
- [Pure] - public static T ResetPassword(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Password = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Password))] + public static T SetPassword(this T o, [Secret] string v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.Password, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Password))] + public static T ResetPassword(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.Password)); #endregion #region Serial - /// - ///

Sets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T SetSerial(this T toolSettings, [Secret] string serial) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = serial; - return toolSettings; - } - /// - ///

Resets

- ///

Activate Unity with the specified serial key. It is good practice to pass the -batchmode and -quit arguments as well, in order to quit Unity when done, if using this for automated activation of Unity. Please allow a few seconds before the license file is created, because Unity needs to communicate with the license server. Make sure that license file folder exists, and has appropriate permissions before running Unity with this argument. If activation fails, see the Editor.log for info.

- ///
- [Pure] - public static T ResetSerial(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Serial = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Serial))] + public static T SetSerial(this T o, [Secret] string v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.Serial, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Serial))] + public static T ResetSerial(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.Serial)); #endregion #region BatchMode - /// - ///

Sets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T SetBatchMode(this T toolSettings, bool? batchMode) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = batchMode; - return toolSettings; - } - /// - ///

Resets

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ResetBatchMode(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = null; - return toolSettings; - } - /// - ///

Enables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T EnableBatchMode(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = true; - return toolSettings; - } - /// - ///

Disables

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T DisableBatchMode(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Run Unity in batch mode. This should always be used in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations that fail, Unity immediately exits with return code 1.Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. Opening a project in batch mode while the Editor has the same project open is not supported; only a single instance of Unity can run at a time.

- ///
- [Pure] - public static T ToggleBatchMode(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BatchMode = !toolSettings.BatchMode; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.BatchMode))] + public static T SetBatchMode(this T o, bool? v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.BatchMode, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.BatchMode))] + public static T ResetBatchMode(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.BatchMode)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.BatchMode))] + public static T EnableBatchMode(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.BatchMode, true)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.BatchMode))] + public static T DisableBatchMode(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.BatchMode, false)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.BatchMode))] + public static T ToggleBatchMode(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.BatchMode, !o.BatchMode)); #endregion #region SilentCrashes - /// - ///

Sets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T SetSilentCrashes(this T toolSettings, bool? silentCrashes) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = silentCrashes; - return toolSettings; - } - /// - ///

Resets

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ResetSilentCrashes(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = null; - return toolSettings; - } - /// - ///

Enables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T EnableSilentCrashes(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = true; - return toolSettings; - } - /// - ///

Disables

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T DisableSilentCrashes(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Don't display a crash dialog.

- ///
- [Pure] - public static T ToggleSilentCrashes(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.SilentCrashes = !toolSettings.SilentCrashes; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.SilentCrashes))] + public static T SetSilentCrashes(this T o, bool? v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.SilentCrashes, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.SilentCrashes))] + public static T ResetSilentCrashes(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.SilentCrashes)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.SilentCrashes))] + public static T EnableSilentCrashes(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.SilentCrashes, true)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.SilentCrashes))] + public static T DisableSilentCrashes(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.SilentCrashes, false)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.SilentCrashes))] + public static T ToggleSilentCrashes(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.SilentCrashes, !o.SilentCrashes)); #endregion #region NoGraphics - /// - ///

Sets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T SetNoGraphics(this T toolSettings, bool? noGraphics) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = noGraphics; - return toolSettings; - } - /// - ///

Resets

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ResetNoGraphics(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = null; - return toolSettings; - } - /// - ///

Enables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T EnableNoGraphics(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = true; - return toolSettings; - } - /// - ///

Disables

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T DisableNoGraphics(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = false; - return toolSettings; - } - /// - ///

Toggles

- ///

When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don't even have a GPU (automated workflows only work when you have a window in focus, otherwise you can't send simulated input commands). Please note that -nographics does not allow you to bake GI on OSX, since Enlighten requires GPU acceleration.

- ///
- [Pure] - public static T ToggleNoGraphics(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoGraphics = !toolSettings.NoGraphics; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.NoGraphics))] + public static T SetNoGraphics(this T o, bool? v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.NoGraphics, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.NoGraphics))] + public static T ResetNoGraphics(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.NoGraphics)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.NoGraphics))] + public static T EnableNoGraphics(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.NoGraphics, true)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.NoGraphics))] + public static T DisableNoGraphics(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.NoGraphics, false)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.NoGraphics))] + public static T ToggleNoGraphics(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.NoGraphics, !o.NoGraphics)); #endregion #region Quit - /// - ///

Sets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T SetQuit(this T toolSettings, bool? quit) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = quit; - return toolSettings; - } - /// - ///

Resets

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ResetQuit(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = null; - return toolSettings; - } - /// - ///

Enables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T EnableQuit(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = true; - return toolSettings; - } - /// - ///

Disables

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T DisableQuit(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = false; - return toolSettings; - } - /// - ///

Toggles

- ///

Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file).

- ///
- [Pure] - public static T ToggleQuit(this T toolSettings) where T : UnityRunTestsSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.Quit = !toolSettings.Quit; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Quit))] + public static T SetQuit(this T o, bool? v) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.Quit, v)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Quit))] + public static T ResetQuit(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Remove(() => o.Quit)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Quit))] + public static T EnableQuit(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.Quit, true)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Quit))] + public static T DisableQuit(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.Quit, false)); + /// + [Pure] [Builder(Type = typeof(UnityRunTestsSettings), Property = nameof(UnityRunTestsSettings.Quit))] + public static T ToggleQuit(this T o) where T : UnityRunTestsSettings => o.Modify(b => b.Set(() => o.Quit, !o.Quit)); #endregion } #endregion -#region UnityBaseSettingsExtensions -/// -/// Used within . -/// +#region UnityOptionsBaseExtensions +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -public static partial class UnityBaseSettingsExtensions +public static partial class UnityOptionsBaseExtensions { #region LogFile - /// - ///

Sets

- ///

Specify where the Editor or Windows/Linux/OSX standalone log file are written.

- ///
- [Pure] - public static T SetLogFile(this T toolSettings, string logFile) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.LogFile = logFile; - return toolSettings; - } - /// - ///

Resets

- ///

Specify where the Editor or Windows/Linux/OSX standalone log file are written.

- ///
- [Pure] - public static T ResetLogFile(this T toolSettings) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.LogFile = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.LogFile))] + public static T SetLogFile(this T o, string v) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.LogFile, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.LogFile))] + public static T ResetLogFile(this T o) where T : UnityOptionsBase => o.Modify(b => b.Remove(() => o.LogFile)); #endregion #region MinimalOutput - /// - ///

Sets

- ///

(experimental) If set to true only warnings and errors will be printed to the output.

- ///
- [Pure] - public static T SetMinimalOutput(this T toolSettings, bool? minimalOutput) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.MinimalOutput = minimalOutput; - return toolSettings; - } - /// - ///

Resets

- ///

(experimental) If set to true only warnings and errors will be printed to the output.

- ///
- [Pure] - public static T ResetMinimalOutput(this T toolSettings) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.MinimalOutput = null; - return toolSettings; - } - /// - ///

Enables

- ///

(experimental) If set to true only warnings and errors will be printed to the output.

- ///
- [Pure] - public static T EnableMinimalOutput(this T toolSettings) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.MinimalOutput = true; - return toolSettings; - } - /// - ///

Disables

- ///

(experimental) If set to true only warnings and errors will be printed to the output.

- ///
- [Pure] - public static T DisableMinimalOutput(this T toolSettings) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.MinimalOutput = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(experimental) If set to true only warnings and errors will be printed to the output.

- ///
- [Pure] - public static T ToggleMinimalOutput(this T toolSettings) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.MinimalOutput = !toolSettings.MinimalOutput; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.MinimalOutput))] + public static T SetMinimalOutput(this T o, bool? v) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.MinimalOutput, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.MinimalOutput))] + public static T ResetMinimalOutput(this T o) where T : UnityOptionsBase => o.Modify(b => b.Remove(() => o.MinimalOutput)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.MinimalOutput))] + public static T EnableMinimalOutput(this T o) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.MinimalOutput, true)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.MinimalOutput))] + public static T DisableMinimalOutput(this T o) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.MinimalOutput, false)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.MinimalOutput))] + public static T ToggleMinimalOutput(this T o) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.MinimalOutput, !o.MinimalOutput)); #endregion #region StableExitCodes - /// - ///

Sets to a new list

- ///

Define exit codes which will not fail the build.

- ///
- [Pure] - public static T SetStableExitCodes(this T toolSettings, params int[] stableExitCodes) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.StableExitCodesInternal = stableExitCodes.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

Define exit codes which will not fail the build.

- ///
- [Pure] - public static T SetStableExitCodes(this T toolSettings, IEnumerable stableExitCodes) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.StableExitCodesInternal = stableExitCodes.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

Define exit codes which will not fail the build.

- ///
- [Pure] - public static T AddStableExitCodes(this T toolSettings, params int[] stableExitCodes) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.StableExitCodesInternal.AddRange(stableExitCodes); - return toolSettings; - } - /// - ///

Adds values to

- ///

Define exit codes which will not fail the build.

- ///
- [Pure] - public static T AddStableExitCodes(this T toolSettings, IEnumerable stableExitCodes) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.StableExitCodesInternal.AddRange(stableExitCodes); - return toolSettings; - } - /// - ///

Clears

- ///

Define exit codes which will not fail the build.

- ///
- [Pure] - public static T ClearStableExitCodes(this T toolSettings) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.StableExitCodesInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

Define exit codes which will not fail the build.

- ///
- [Pure] - public static T RemoveStableExitCodes(this T toolSettings, params int[] stableExitCodes) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(stableExitCodes); - toolSettings.StableExitCodesInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

Define exit codes which will not fail the build.

- ///
- [Pure] - public static T RemoveStableExitCodes(this T toolSettings, IEnumerable stableExitCodes) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(stableExitCodes); - toolSettings.StableExitCodesInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.StableExitCodes))] + public static T SetStableExitCodes(this T o, params int[] v) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.StableExitCodes, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.StableExitCodes))] + public static T SetStableExitCodes(this T o, IEnumerable v) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.StableExitCodes, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.StableExitCodes))] + public static T AddStableExitCodes(this T o, params int[] v) where T : UnityOptionsBase => o.Modify(b => b.AddCollection(() => o.StableExitCodes, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.StableExitCodes))] + public static T AddStableExitCodes(this T o, IEnumerable v) where T : UnityOptionsBase => o.Modify(b => b.AddCollection(() => o.StableExitCodes, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.StableExitCodes))] + public static T RemoveStableExitCodes(this T o, params int[] v) where T : UnityOptionsBase => o.Modify(b => b.RemoveCollection(() => o.StableExitCodes, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.StableExitCodes))] + public static T RemoveStableExitCodes(this T o, IEnumerable v) where T : UnityOptionsBase => o.Modify(b => b.RemoveCollection(() => o.StableExitCodes, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.StableExitCodes))] + public static T ClearStableExitCodes(this T o) where T : UnityOptionsBase => o.Modify(b => b.ClearCollection(() => o.StableExitCodes)); #endregion #region HubVersion - /// - ///

Sets

- ///

Defines the Unity version to use. The version must be installed via Unity Hub.

- ///
- [Pure] - public static T SetHubVersion(this T toolSettings, string hubVersion) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.HubVersion = hubVersion; - return toolSettings; - } - /// - ///

Resets

- ///

Defines the Unity version to use. The version must be installed via Unity Hub.

- ///
- [Pure] - public static T ResetHubVersion(this T toolSettings) where T : UnityBaseSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.HubVersion = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.HubVersion))] + public static T SetHubVersion(this T o, string v) where T : UnityOptionsBase => o.Modify(b => b.Set(() => o.HubVersion, v)); + /// + [Pure] [Builder(Type = typeof(UnityOptionsBase), Property = nameof(UnityOptionsBase.HubVersion))] + public static T ResetHubVersion(this T o) where T : UnityOptionsBase => o.Modify(b => b.Remove(() => o.HubVersion)); #endregion } #endregion -#region UnityProjectSettingsExtensions -/// -/// Used within . -/// +#region UnityProjectOptionsExtensions +/// Used within . [PublicAPI] [ExcludeFromCodeCoverage] -public static partial class UnityProjectSettingsExtensions +public static partial class UnityProjectOptionsExtensions { #region AssetServerUpdate - /// - ///

Sets

- ///

Force an update of the project in the Asset Server given by IP:port. The port is optional, and if not given it is assumed to be the standard one (10733). It is advisable to use this command in conjunction with the -projectPath argument to ensure you are working with the correct project. If no project name is given, then the last project opened by Unity is used. If no project exists at the path given by -projectPath, then one is created automatically.

- ///
- [Pure] - public static T SetAssetServerUpdate(this T toolSettings, string assetServerUpdate) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.AssetServerUpdate = assetServerUpdate; - return toolSettings; - } - /// - ///

Resets

- ///

Force an update of the project in the Asset Server given by IP:port. The port is optional, and if not given it is assumed to be the standard one (10733). It is advisable to use this command in conjunction with the -projectPath argument to ensure you are working with the correct project. If no project name is given, then the last project opened by Unity is used. If no project exists at the path given by -projectPath, then one is created automatically.

- ///
- [Pure] - public static T ResetAssetServerUpdate(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.AssetServerUpdate = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.AssetServerUpdate))] + public static T SetAssetServerUpdate(this T o, string v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.AssetServerUpdate, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.AssetServerUpdate))] + public static T ResetAssetServerUpdate(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.AssetServerUpdate)); #endregion #region BuildTarget - /// - ///

Sets

- ///

Allows the selection of an active build target before a project is loaded.

- ///
- [Pure] - public static T SetBuildTarget(this T toolSettings, string buildTarget) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildTarget = buildTarget; - return toolSettings; - } - /// - ///

Resets

- ///

Allows the selection of an active build target before a project is loaded.

- ///
- [Pure] - public static T ResetBuildTarget(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.BuildTarget = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.BuildTarget))] + public static T SetBuildTarget(this T o, UnityBuildTarget v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.BuildTarget, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.BuildTarget))] + public static T ResetBuildTarget(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.BuildTarget)); #endregion #region ForceD3d11 - /// - ///

Sets

- ///

(Windows only) Make the Editor use Direct3D 11 for rendering. Normally the graphics API depends on player settings (typically defaults to D3D11).

- ///
- [Pure] - public static T SetForceD3d11(this T toolSettings, bool? forceD3d11) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceD3d11 = forceD3d11; - return toolSettings; - } - /// - ///

Resets

- ///

(Windows only) Make the Editor use Direct3D 11 for rendering. Normally the graphics API depends on player settings (typically defaults to D3D11).

- ///
- [Pure] - public static T ResetForceD3d11(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceD3d11 = null; - return toolSettings; - } - /// - ///

Enables

- ///

(Windows only) Make the Editor use Direct3D 11 for rendering. Normally the graphics API depends on player settings (typically defaults to D3D11).

- ///
- [Pure] - public static T EnableForceD3d11(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceD3d11 = true; - return toolSettings; - } - /// - ///

Disables

- ///

(Windows only) Make the Editor use Direct3D 11 for rendering. Normally the graphics API depends on player settings (typically defaults to D3D11).

- ///
- [Pure] - public static T DisableForceD3d11(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceD3d11 = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(Windows only) Make the Editor use Direct3D 11 for rendering. Normally the graphics API depends on player settings (typically defaults to D3D11).

- ///
- [Pure] - public static T ToggleForceD3d11(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceD3d11 = !toolSettings.ForceD3d11; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceD3d11))] + public static T SetForceD3d11(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceD3d11, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceD3d11))] + public static T ResetForceD3d11(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceD3d11)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceD3d11))] + public static T EnableForceD3d11(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceD3d11, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceD3d11))] + public static T DisableForceD3d11(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceD3d11, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceD3d11))] + public static T ToggleForceD3d11(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceD3d11, !o.ForceD3d11)); #endregion #region ForceDeviceIndex - /// - ///

Sets

- ///

(macOS only) When using Metal, make the Editor use a particular GPU device by passing it the index of that GPU.

- ///
- [Pure] - public static T SetForceDeviceIndex(this T toolSettings, bool? forceDeviceIndex) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceDeviceIndex = forceDeviceIndex; - return toolSettings; - } - /// - ///

Resets

- ///

(macOS only) When using Metal, make the Editor use a particular GPU device by passing it the index of that GPU.

- ///
- [Pure] - public static T ResetForceDeviceIndex(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceDeviceIndex = null; - return toolSettings; - } - /// - ///

Enables

- ///

(macOS only) When using Metal, make the Editor use a particular GPU device by passing it the index of that GPU.

- ///
- [Pure] - public static T EnableForceDeviceIndex(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceDeviceIndex = true; - return toolSettings; - } - /// - ///

Disables

- ///

(macOS only) When using Metal, make the Editor use a particular GPU device by passing it the index of that GPU.

- ///
- [Pure] - public static T DisableForceDeviceIndex(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceDeviceIndex = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(macOS only) When using Metal, make the Editor use a particular GPU device by passing it the index of that GPU.

- ///
- [Pure] - public static T ToggleForceDeviceIndex(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceDeviceIndex = !toolSettings.ForceDeviceIndex; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceDeviceIndex))] + public static T SetForceDeviceIndex(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceDeviceIndex, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceDeviceIndex))] + public static T ResetForceDeviceIndex(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceDeviceIndex)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceDeviceIndex))] + public static T EnableForceDeviceIndex(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceDeviceIndex, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceDeviceIndex))] + public static T DisableForceDeviceIndex(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceDeviceIndex, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceDeviceIndex))] + public static T ToggleForceDeviceIndex(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceDeviceIndex, !o.ForceDeviceIndex)); #endregion #region ForceGfxMetal - /// - ///

Sets

- ///

(macOS only) Make the Editor use Metal as the default graphics API.

- ///
- [Pure] - public static T SetForceGfxMetal(this T toolSettings, bool? forceGfxMetal) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGfxMetal = forceGfxMetal; - return toolSettings; - } - /// - ///

Resets

- ///

(macOS only) Make the Editor use Metal as the default graphics API.

- ///
- [Pure] - public static T ResetForceGfxMetal(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGfxMetal = null; - return toolSettings; - } - /// - ///

Enables

- ///

(macOS only) Make the Editor use Metal as the default graphics API.

- ///
- [Pure] - public static T EnableForceGfxMetal(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGfxMetal = true; - return toolSettings; - } - /// - ///

Disables

- ///

(macOS only) Make the Editor use Metal as the default graphics API.

- ///
- [Pure] - public static T DisableForceGfxMetal(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGfxMetal = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(macOS only) Make the Editor use Metal as the default graphics API.

- ///
- [Pure] - public static T ToggleForceGfxMetal(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGfxMetal = !toolSettings.ForceGfxMetal; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGfxMetal))] + public static T SetForceGfxMetal(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGfxMetal, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGfxMetal))] + public static T ResetForceGfxMetal(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceGfxMetal)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGfxMetal))] + public static T EnableForceGfxMetal(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGfxMetal, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGfxMetal))] + public static T DisableForceGfxMetal(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGfxMetal, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGfxMetal))] + public static T ToggleForceGfxMetal(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGfxMetal, !o.ForceGfxMetal)); #endregion #region ForceGLCore - /// - ///

Sets

- ///

(Windows only) Make the Editor use OpenGL 3/4 core profile for rendering. The Editor tries to use the best OpenGL version available and all OpenGL extensions exposed by the OpenGL drivers. If the platform isn't supported, Direct3D is used.

- ///
- [Pure] - public static T SetForceGLCore(this T toolSettings, bool? forceGLCore) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLCore = forceGLCore; - return toolSettings; - } - /// - ///

Resets

- ///

(Windows only) Make the Editor use OpenGL 3/4 core profile for rendering. The Editor tries to use the best OpenGL version available and all OpenGL extensions exposed by the OpenGL drivers. If the platform isn't supported, Direct3D is used.

- ///
- [Pure] - public static T ResetForceGLCore(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLCore = null; - return toolSettings; - } - /// - ///

Enables

- ///

(Windows only) Make the Editor use OpenGL 3/4 core profile for rendering. The Editor tries to use the best OpenGL version available and all OpenGL extensions exposed by the OpenGL drivers. If the platform isn't supported, Direct3D is used.

- ///
- [Pure] - public static T EnableForceGLCore(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLCore = true; - return toolSettings; - } - /// - ///

Disables

- ///

(Windows only) Make the Editor use OpenGL 3/4 core profile for rendering. The Editor tries to use the best OpenGL version available and all OpenGL extensions exposed by the OpenGL drivers. If the platform isn't supported, Direct3D is used.

- ///
- [Pure] - public static T DisableForceGLCore(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLCore = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(Windows only) Make the Editor use OpenGL 3/4 core profile for rendering. The Editor tries to use the best OpenGL version available and all OpenGL extensions exposed by the OpenGL drivers. If the platform isn't supported, Direct3D is used.

- ///
- [Pure] - public static T ToggleForceGLCore(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLCore = !toolSettings.ForceGLCore; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLCore))] + public static T SetForceGLCore(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLCore, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLCore))] + public static T ResetForceGLCore(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceGLCore)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLCore))] + public static T EnableForceGLCore(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLCore, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLCore))] + public static T DisableForceGLCore(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLCore, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLCore))] + public static T ToggleForceGLCore(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLCore, !o.ForceGLCore)); #endregion #region ForceGLCoreXY - /// - ///

Sets

- ///

(Windows only) Similar to -force-glcore, but requests a specific OpenGL context version. Accepted values for XY: 32, 33, 40, 41, 42, 43, 44 or 45.

- ///
- [Pure] - public static T SetForceGLCoreXY(this T toolSettings, UnityGLCore forceGLCoreXY) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLCoreXY = forceGLCoreXY; - return toolSettings; - } - /// - ///

Resets

- ///

(Windows only) Similar to -force-glcore, but requests a specific OpenGL context version. Accepted values for XY: 32, 33, 40, 41, 42, 43, 44 or 45.

- ///
- [Pure] - public static T ResetForceGLCoreXY(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLCoreXY = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLCoreXY))] + public static T SetForceGLCoreXY(this T o, UnityGLCore v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLCoreXY, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLCoreXY))] + public static T ResetForceGLCoreXY(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceGLCoreXY)); #endregion #region ForceGLES - /// - ///

Sets

- ///

(Windows only) Make the Editor use OpenGL for Embedded Systems for rendering. The Editor tries to use the best OpenGL ES version available, and all OpenGL ES extensions exposed by the OpenGL drivers.

- ///
- [Pure] - public static T SetForceGLES(this T toolSettings, bool? forceGLES) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLES = forceGLES; - return toolSettings; - } - /// - ///

Resets

- ///

(Windows only) Make the Editor use OpenGL for Embedded Systems for rendering. The Editor tries to use the best OpenGL ES version available, and all OpenGL ES extensions exposed by the OpenGL drivers.

- ///
- [Pure] - public static T ResetForceGLES(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLES = null; - return toolSettings; - } - /// - ///

Enables

- ///

(Windows only) Make the Editor use OpenGL for Embedded Systems for rendering. The Editor tries to use the best OpenGL ES version available, and all OpenGL ES extensions exposed by the OpenGL drivers.

- ///
- [Pure] - public static T EnableForceGLES(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLES = true; - return toolSettings; - } - /// - ///

Disables

- ///

(Windows only) Make the Editor use OpenGL for Embedded Systems for rendering. The Editor tries to use the best OpenGL ES version available, and all OpenGL ES extensions exposed by the OpenGL drivers.

- ///
- [Pure] - public static T DisableForceGLES(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLES = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(Windows only) Make the Editor use OpenGL for Embedded Systems for rendering. The Editor tries to use the best OpenGL ES version available, and all OpenGL ES extensions exposed by the OpenGL drivers.

- ///
- [Pure] - public static T ToggleForceGLES(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLES = !toolSettings.ForceGLES; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLES))] + public static T SetForceGLES(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLES, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLES))] + public static T ResetForceGLES(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceGLES)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLES))] + public static T EnableForceGLES(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLES, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLES))] + public static T DisableForceGLES(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLES, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLES))] + public static T ToggleForceGLES(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLES, !o.ForceGLES)); #endregion #region ForceGLESXY - /// - ///

Sets

- ///

(Windows only) Similar to -force-gles, but requests a specific OpenGL ES context version. Accepted values for XY: 30, 31 or 32.

- ///
- [Pure] - public static T SetForceGLESXY(this T toolSettings, UnityGLES forceGLESXY) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLESXY = forceGLESXY; - return toolSettings; - } - /// - ///

Resets

- ///

(Windows only) Similar to -force-gles, but requests a specific OpenGL ES context version. Accepted values for XY: 30, 31 or 32.

- ///
- [Pure] - public static T ResetForceGLESXY(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceGLESXY = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLESXY))] + public static T SetForceGLESXY(this T o, UnityGLES v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceGLESXY, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceGLESXY))] + public static T ResetForceGLESXY(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceGLESXY)); #endregion #region ForceClamped - /// - ///

Sets

- ///

(2017.3+) (Windows only) Used with -force-glcoreXY to prevent checking for additional OpenGL extensions, allowing it to run between platforms with the same code paths.

- ///
- [Pure] - public static T SetForceClamped(this T toolSettings, bool? forceClamped) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceClamped = forceClamped; - return toolSettings; - } - /// - ///

Resets

- ///

(2017.3+) (Windows only) Used with -force-glcoreXY to prevent checking for additional OpenGL extensions, allowing it to run between platforms with the same code paths.

- ///
- [Pure] - public static T ResetForceClamped(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceClamped = null; - return toolSettings; - } - /// - ///

Enables

- ///

(2017.3+) (Windows only) Used with -force-glcoreXY to prevent checking for additional OpenGL extensions, allowing it to run between platforms with the same code paths.

- ///
- [Pure] - public static T EnableForceClamped(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceClamped = true; - return toolSettings; - } - /// - ///

Disables

- ///

(2017.3+) (Windows only) Used with -force-glcoreXY to prevent checking for additional OpenGL extensions, allowing it to run between platforms with the same code paths.

- ///
- [Pure] - public static T DisableForceClamped(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceClamped = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(2017.3+) (Windows only) Used with -force-glcoreXY to prevent checking for additional OpenGL extensions, allowing it to run between platforms with the same code paths.

- ///
- [Pure] - public static T ToggleForceClamped(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceClamped = !toolSettings.ForceClamped; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceClamped))] + public static T SetForceClamped(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceClamped, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceClamped))] + public static T ResetForceClamped(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceClamped)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceClamped))] + public static T EnableForceClamped(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceClamped, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceClamped))] + public static T DisableForceClamped(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceClamped, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceClamped))] + public static T ToggleForceClamped(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceClamped, !o.ForceClamped)); #endregion #region ForceLowPowerDevice - /// - ///

Sets

- ///

(macOS only) When using Metal, make the Editor use a low power device.

- ///
- [Pure] - public static T SetForceLowPowerDevice(this T toolSettings, bool? forceLowPowerDevice) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceLowPowerDevice = forceLowPowerDevice; - return toolSettings; - } - /// - ///

Resets

- ///

(macOS only) When using Metal, make the Editor use a low power device.

- ///
- [Pure] - public static T ResetForceLowPowerDevice(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceLowPowerDevice = null; - return toolSettings; - } - /// - ///

Enables

- ///

(macOS only) When using Metal, make the Editor use a low power device.

- ///
- [Pure] - public static T EnableForceLowPowerDevice(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceLowPowerDevice = true; - return toolSettings; - } - /// - ///

Disables

- ///

(macOS only) When using Metal, make the Editor use a low power device.

- ///
- [Pure] - public static T DisableForceLowPowerDevice(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceLowPowerDevice = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(macOS only) When using Metal, make the Editor use a low power device.

- ///
- [Pure] - public static T ToggleForceLowPowerDevice(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ForceLowPowerDevice = !toolSettings.ForceLowPowerDevice; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceLowPowerDevice))] + public static T SetForceLowPowerDevice(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceLowPowerDevice, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceLowPowerDevice))] + public static T ResetForceLowPowerDevice(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ForceLowPowerDevice)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceLowPowerDevice))] + public static T EnableForceLowPowerDevice(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceLowPowerDevice, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceLowPowerDevice))] + public static T DisableForceLowPowerDevice(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceLowPowerDevice, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ForceLowPowerDevice))] + public static T ToggleForceLowPowerDevice(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ForceLowPowerDevice, !o.ForceLowPowerDevice)); #endregion #region DefaultPlatformTextureFormat - /// - ///

Sets

- ///

(2018.1+) Sets the default texture compression to the desired format before importing a texture or building the project. This is so you don’t have to import the texture again with the format you want. The available formats are dxt, pvrtc, atc, etc, etc2, and astc. Note that this is only supported on Android.

- ///
- [Pure] - public static T SetDefaultPlatformTextureFormat(this T toolSettings, string defaultPlatformTextureFormat) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.DefaultPlatformTextureFormat = defaultPlatformTextureFormat; - return toolSettings; - } - /// - ///

Resets

- ///

(2018.1+) Sets the default texture compression to the desired format before importing a texture or building the project. This is so you don’t have to import the texture again with the format you want. The available formats are dxt, pvrtc, atc, etc, etc2, and astc. Note that this is only supported on Android.

- ///
- [Pure] - public static T ResetDefaultPlatformTextureFormat(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.DefaultPlatformTextureFormat = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DefaultPlatformTextureFormat))] + public static T SetDefaultPlatformTextureFormat(this T o, string v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.DefaultPlatformTextureFormat, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DefaultPlatformTextureFormat))] + public static T ResetDefaultPlatformTextureFormat(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.DefaultPlatformTextureFormat)); #endregion #region DisableAssemblyUpdater - /// - ///

Sets to a new list

- ///

Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies.

- ///
- [Pure] - public static T SetDisableAssemblyUpdater(this T toolSettings, params string[] disableAssemblyUpdater) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.DisableAssemblyUpdaterInternal = disableAssemblyUpdater.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies.

- ///
- [Pure] - public static T SetDisableAssemblyUpdater(this T toolSettings, IEnumerable disableAssemblyUpdater) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.DisableAssemblyUpdaterInternal = disableAssemblyUpdater.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies.

- ///
- [Pure] - public static T AddDisableAssemblyUpdater(this T toolSettings, params string[] disableAssemblyUpdater) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.DisableAssemblyUpdaterInternal.AddRange(disableAssemblyUpdater); - return toolSettings; - } - /// - ///

Adds values to

- ///

Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies.

- ///
- [Pure] - public static T AddDisableAssemblyUpdater(this T toolSettings, IEnumerable disableAssemblyUpdater) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.DisableAssemblyUpdaterInternal.AddRange(disableAssemblyUpdater); - return toolSettings; - } - /// - ///

Clears

- ///

Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies.

- ///
- [Pure] - public static T ClearDisableAssemblyUpdater(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.DisableAssemblyUpdaterInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies.

- ///
- [Pure] - public static T RemoveDisableAssemblyUpdater(this T toolSettings, params string[] disableAssemblyUpdater) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(disableAssemblyUpdater); - toolSettings.DisableAssemblyUpdaterInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

Specify a space-separated list of assembly names as parameters for Unity to ignore on automatic updates. The space-separated list of assembly names is optional: Pass the command line options without any assembly names to ignore all assemblies.

- ///
- [Pure] - public static T RemoveDisableAssemblyUpdater(this T toolSettings, IEnumerable disableAssemblyUpdater) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(disableAssemblyUpdater); - toolSettings.DisableAssemblyUpdaterInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DisableAssemblyUpdater))] + public static T SetDisableAssemblyUpdater(this T o, params string[] v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.DisableAssemblyUpdater, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DisableAssemblyUpdater))] + public static T SetDisableAssemblyUpdater(this T o, IEnumerable v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.DisableAssemblyUpdater, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DisableAssemblyUpdater))] + public static T AddDisableAssemblyUpdater(this T o, params string[] v) where T : UnityProjectOptions => o.Modify(b => b.AddCollection(() => o.DisableAssemblyUpdater, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DisableAssemblyUpdater))] + public static T AddDisableAssemblyUpdater(this T o, IEnumerable v) where T : UnityProjectOptions => o.Modify(b => b.AddCollection(() => o.DisableAssemblyUpdater, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DisableAssemblyUpdater))] + public static T RemoveDisableAssemblyUpdater(this T o, params string[] v) where T : UnityProjectOptions => o.Modify(b => b.RemoveCollection(() => o.DisableAssemblyUpdater, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DisableAssemblyUpdater))] + public static T RemoveDisableAssemblyUpdater(this T o, IEnumerable v) where T : UnityProjectOptions => o.Modify(b => b.RemoveCollection(() => o.DisableAssemblyUpdater, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.DisableAssemblyUpdater))] + public static T ClearDisableAssemblyUpdater(this T o) where T : UnityProjectOptions => o.Modify(b => b.ClearCollection(() => o.DisableAssemblyUpdater)); #endregion #region CacheServerIPAddress - /// - ///

Sets

- ///

(2018.1+) Connect to the Cache Server given by IP:port on startup, overriding any configuration stored in the Editor Preferences. Use this to connect multiple instances of Unity to different Cache Servers.

- ///
- [Pure] - public static T SetCacheServerIPAddress(this T toolSettings, string cacheServerIPAddress) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CacheServerIPAddress = cacheServerIPAddress; - return toolSettings; - } - /// - ///

Resets

- ///

(2018.1+) Connect to the Cache Server given by IP:port on startup, overriding any configuration stored in the Editor Preferences. Use this to connect multiple instances of Unity to different Cache Servers.

- ///
- [Pure] - public static T ResetCacheServerIPAddress(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CacheServerIPAddress = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CacheServerIPAddress))] + public static T SetCacheServerIPAddress(this T o, string v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.CacheServerIPAddress, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CacheServerIPAddress))] + public static T ResetCacheServerIPAddress(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.CacheServerIPAddress)); #endregion #region NoUpm - /// - ///

Sets

- ///

(2018.1+) Disables the Unity Package Manager.

- ///
- [Pure] - public static T SetNoUpm(this T toolSettings, bool? noUpm) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoUpm = noUpm; - return toolSettings; - } - /// - ///

Resets

- ///

(2018.1+) Disables the Unity Package Manager.

- ///
- [Pure] - public static T ResetNoUpm(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoUpm = null; - return toolSettings; - } - /// - ///

Enables

- ///

(2018.1+) Disables the Unity Package Manager.

- ///
- [Pure] - public static T EnableNoUpm(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoUpm = true; - return toolSettings; - } - /// - ///

Disables

- ///

(2018.1+) Disables the Unity Package Manager.

- ///
- [Pure] - public static T DisableNoUpm(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoUpm = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(2018.1+) Disables the Unity Package Manager.

- ///
- [Pure] - public static T ToggleNoUpm(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.NoUpm = !toolSettings.NoUpm; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.NoUpm))] + public static T SetNoUpm(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.NoUpm, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.NoUpm))] + public static T ResetNoUpm(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.NoUpm)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.NoUpm))] + public static T EnableNoUpm(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.NoUpm, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.NoUpm))] + public static T DisableNoUpm(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.NoUpm, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.NoUpm))] + public static T ToggleNoUpm(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.NoUpm, !o.NoUpm)); #endregion #region AcceptApiUpdate - /// - ///

Sets

- ///

(2017.2+) Use this command line option to specify that APIUpdater should run when Unity is launched in batch mode. Omitting this command line argument when launching Unity in batch mode results in APIUpdater not running which can lead to compiler errors. Note that in versions prior to 2017.2 there’s no way to not run APIUpdater when Unity is launched in batch mode.

- ///
- [Pure] - public static T SetAcceptApiUpdate(this T toolSettings, bool? acceptApiUpdate) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.AcceptApiUpdate = acceptApiUpdate; - return toolSettings; - } - /// - ///

Resets

- ///

(2017.2+) Use this command line option to specify that APIUpdater should run when Unity is launched in batch mode. Omitting this command line argument when launching Unity in batch mode results in APIUpdater not running which can lead to compiler errors. Note that in versions prior to 2017.2 there’s no way to not run APIUpdater when Unity is launched in batch mode.

- ///
- [Pure] - public static T ResetAcceptApiUpdate(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.AcceptApiUpdate = null; - return toolSettings; - } - /// - ///

Enables

- ///

(2017.2+) Use this command line option to specify that APIUpdater should run when Unity is launched in batch mode. Omitting this command line argument when launching Unity in batch mode results in APIUpdater not running which can lead to compiler errors. Note that in versions prior to 2017.2 there’s no way to not run APIUpdater when Unity is launched in batch mode.

- ///
- [Pure] - public static T EnableAcceptApiUpdate(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.AcceptApiUpdate = true; - return toolSettings; - } - /// - ///

Disables

- ///

(2017.2+) Use this command line option to specify that APIUpdater should run when Unity is launched in batch mode. Omitting this command line argument when launching Unity in batch mode results in APIUpdater not running which can lead to compiler errors. Note that in versions prior to 2017.2 there’s no way to not run APIUpdater when Unity is launched in batch mode.

- ///
- [Pure] - public static T DisableAcceptApiUpdate(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.AcceptApiUpdate = false; - return toolSettings; - } - /// - ///

Toggles

- ///

(2017.2+) Use this command line option to specify that APIUpdater should run when Unity is launched in batch mode. Omitting this command line argument when launching Unity in batch mode results in APIUpdater not running which can lead to compiler errors. Note that in versions prior to 2017.2 there’s no way to not run APIUpdater when Unity is launched in batch mode.

- ///
- [Pure] - public static T ToggleAcceptApiUpdate(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.AcceptApiUpdate = !toolSettings.AcceptApiUpdate; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.AcceptApiUpdate))] + public static T SetAcceptApiUpdate(this T o, bool? v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.AcceptApiUpdate, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.AcceptApiUpdate))] + public static T ResetAcceptApiUpdate(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.AcceptApiUpdate)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.AcceptApiUpdate))] + public static T EnableAcceptApiUpdate(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.AcceptApiUpdate, true)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.AcceptApiUpdate))] + public static T DisableAcceptApiUpdate(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.AcceptApiUpdate, false)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.AcceptApiUpdate))] + public static T ToggleAcceptApiUpdate(this T o) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.AcceptApiUpdate, !o.AcceptApiUpdate)); #endregion #region CustomArguments - /// - ///

Sets to a new list

- ///

Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs.

- ///
- [Pure] - public static T SetCustomArguments(this T toolSettings, params string[] customArguments) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CustomArgumentsInternal = customArguments.ToList(); - return toolSettings; - } - /// - ///

Sets to a new list

- ///

Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs.

- ///
- [Pure] - public static T SetCustomArguments(this T toolSettings, IEnumerable customArguments) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CustomArgumentsInternal = customArguments.ToList(); - return toolSettings; - } - /// - ///

Adds values to

- ///

Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs.

- ///
- [Pure] - public static T AddCustomArguments(this T toolSettings, params string[] customArguments) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CustomArgumentsInternal.AddRange(customArguments); - return toolSettings; - } - /// - ///

Adds values to

- ///

Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs.

- ///
- [Pure] - public static T AddCustomArguments(this T toolSettings, IEnumerable customArguments) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CustomArgumentsInternal.AddRange(customArguments); - return toolSettings; - } - /// - ///

Clears

- ///

Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs.

- ///
- [Pure] - public static T ClearCustomArguments(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.CustomArgumentsInternal.Clear(); - return toolSettings; - } - /// - ///

Removes values from

- ///

Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs.

- ///
- [Pure] - public static T RemoveCustomArguments(this T toolSettings, params string[] customArguments) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(customArguments); - toolSettings.CustomArgumentsInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } - /// - ///

Removes values from

- ///

Custom parameters. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs.

- ///
- [Pure] - public static T RemoveCustomArguments(this T toolSettings, IEnumerable customArguments) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - var hashSet = new HashSet(customArguments); - toolSettings.CustomArgumentsInternal.RemoveAll(x => hashSet.Contains(x)); - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CustomArguments))] + public static T SetCustomArguments(this T o, params string[] v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.CustomArguments, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CustomArguments))] + public static T SetCustomArguments(this T o, IEnumerable v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.CustomArguments, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CustomArguments))] + public static T AddCustomArguments(this T o, params string[] v) where T : UnityProjectOptions => o.Modify(b => b.AddCollection(() => o.CustomArguments, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CustomArguments))] + public static T AddCustomArguments(this T o, IEnumerable v) where T : UnityProjectOptions => o.Modify(b => b.AddCollection(() => o.CustomArguments, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CustomArguments))] + public static T RemoveCustomArguments(this T o, params string[] v) where T : UnityProjectOptions => o.Modify(b => b.RemoveCollection(() => o.CustomArguments, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CustomArguments))] + public static T RemoveCustomArguments(this T o, IEnumerable v) where T : UnityProjectOptions => o.Modify(b => b.RemoveCollection(() => o.CustomArguments, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.CustomArguments))] + public static T ClearCustomArguments(this T o) where T : UnityProjectOptions => o.Modify(b => b.ClearCollection(() => o.CustomArguments)); #endregion #region StackTraceLogType - /// - ///

Sets

- ///

Detailed debugging feature. StackTraceLogging allows you to allow detailed logging.

- ///
- [Pure] - public static T SetStackTraceLogType(this T toolSettings, UnityStackTraceLogType stackTraceLogType) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.StackTraceLogType = stackTraceLogType; - return toolSettings; - } - /// - ///

Resets

- ///

Detailed debugging feature. StackTraceLogging allows you to allow detailed logging.

- ///
- [Pure] - public static T ResetStackTraceLogType(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.StackTraceLogType = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.StackTraceLogType))] + public static T SetStackTraceLogType(this T o, UnityStackTraceLogType v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.StackTraceLogType, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.StackTraceLogType))] + public static T ResetStackTraceLogType(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.StackTraceLogType)); #endregion #region ProjectPath - /// - ///

Sets

- ///

Specify the path of the unity project.

- ///
- [Pure] - public static T SetProjectPath(this T toolSettings, string projectPath) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ProjectPath = projectPath; - return toolSettings; - } - /// - ///

Resets

- ///

Specify the path of the unity project.

- ///
- [Pure] - public static T ResetProjectPath(this T toolSettings) where T : UnityProjectSettings - { - toolSettings = toolSettings.NewInstance(); - toolSettings.ProjectPath = null; - return toolSettings; - } + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ProjectPath))] + public static T SetProjectPath(this T o, string v) where T : UnityProjectOptions => o.Modify(b => b.Set(() => o.ProjectPath, v)); + /// + [Pure] [Builder(Type = typeof(UnityProjectOptions), Property = nameof(UnityProjectOptions.ProjectPath))] + public static T ResetProjectPath(this T o) where T : UnityProjectOptions => o.Modify(b => b.Remove(() => o.ProjectPath)); #endregion } #endregion #region UnityBuildTarget -/// -/// Used within . -/// +/// Used within . [PublicAPI] [Serializable] [ExcludeFromCodeCoverage] @@ -4472,9 +1438,7 @@ public static implicit operator UnityBuildTarget(string value) } #endregion #region UnityGLCore -/// -/// Used within . -/// +/// Used within . [PublicAPI] [Serializable] [ExcludeFromCodeCoverage] @@ -4496,9 +1460,7 @@ public static implicit operator UnityGLCore(string value) } #endregion #region UnityGLES -/// -/// Used within . -/// +/// Used within . [PublicAPI] [Serializable] [ExcludeFromCodeCoverage] @@ -4515,9 +1477,7 @@ public static implicit operator UnityGLES(string value) } #endregion #region UnityStackTraceLogType -/// -/// Used within . -/// +/// Used within . [PublicAPI] [Serializable] [ExcludeFromCodeCoverage] @@ -4534,9 +1494,7 @@ public static implicit operator UnityStackTraceLogType(string value) } #endregion #region UnityPlatformTextureFormat -/// -/// Used within . -/// +/// Used within . [PublicAPI] [Serializable] [ExcludeFromCodeCoverage] @@ -4556,9 +1514,7 @@ public static implicit operator UnityPlatformTextureFormat(string value) } #endregion #region UnityTestPlatform -/// -/// Used within . -/// +/// Used within . [PublicAPI] [Serializable] [ExcludeFromCodeCoverage] diff --git a/source/Nuke.Common/Tools/Unity/Unity.json b/source/Nuke.Common/Tools/Unity/Unity.json index 353fb1762..e97025620 100644 --- a/source/Nuke.Common/Tools/Unity/Unity.json +++ b/source/Nuke.Common/Tools/Unity/Unity.json @@ -16,7 +16,7 @@ "customAssertion": true, "definiteArgument": "-createManualActivationFile", "settingsClass": { - "baseClass": "UnityBaseSettings" + "baseClass": "UnityOptionsBase" } }, { @@ -26,7 +26,7 @@ "customStart": true, "customAssertion": true, "settingsClass": { - "baseClass": "UnityBaseSettings", + "baseClass": "UnityOptionsBase", "properties": [ { "name": "LicenseFile", @@ -43,7 +43,7 @@ "customStart": true, "customAssertion": true, "settingsClass": { - "baseClass": "UnityProjectSettings", + "baseClass": "UnityProjectOptions", "properties": [ { "name": "BuildLinux32Player", @@ -155,7 +155,7 @@ "customAssertion": true, "definiteArgument": "-returnlicense", "settingsClass": { - "baseClass": "UnityBaseSettings" + "baseClass": "UnityOptionsBase" } }, { @@ -166,7 +166,7 @@ "customAssertion": true, "definiteArgument": "-runTests", "settingsClass": { - "baseClass": "UnityProjectSettings", + "baseClass": "UnityProjectOptions", "properties": [ { "name": "TestCategories", @@ -192,7 +192,7 @@ }, { "name": "TestPlatform", - "type": "string", + "type": "UnityTestPlatform", "format": "-testPlatform {value}", "help": "The platform to run tests on." } @@ -248,7 +248,8 @@ ], "dataClasses": [ { - "name": "UnityBaseSettings", + "name": "UnityOptionsBase", + "baseClass": "ToolOptions", "extensionMethods": true, "properties": [ { @@ -279,8 +280,8 @@ ] }, { - "name": "UnityProjectSettings", - "baseClass": "UnityBaseSettings", + "name": "UnityProjectOptions", + "baseClass": "UnityOptionsBase", "extensionMethods": true, "properties": [ { @@ -291,7 +292,7 @@ }, { "name": "BuildTarget", - "type": "string", + "type": "UnityBuildTarget", "format": "-buildTarget {value}", "help": "Allows the selection of an active build target before a project is loaded." }, diff --git a/source/Nuke.Common/Tools/Unity/UnityBaseSettings.cs b/source/Nuke.Common/Tools/Unity/UnityBaseSettings.cs deleted file mode 100644 index ff987f7b7..000000000 --- a/source/Nuke.Common/Tools/Unity/UnityBaseSettings.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2023 Maintainers of NUKE. -// Distributed under the MIT License. -// https://github.com/nuke-build/nuke/blob/master/LICENSE - -using System; -using System.Linq; -using Nuke.Common.Tooling; -using Nuke.Common.Utilities; - -namespace Nuke.Common.Tools.Unity; - -public partial class UnityBaseSettings -{ - public override Action ProcessLogger => base.ProcessLogger ?? UnityTasks.UnityLogger; - - public string GetProcessToolPath() - { - return UnityTasks.GetToolPath(HubVersion); - } - - public string GetLogFile() - { - return (LogFile ?? NukeBuild.RootDirectory / "unity.log").DoubleQuoteIfNeeded(); - } -} diff --git a/source/Nuke.Common/Tools/Unity/UnityProjectSettingsExtensions.cs b/source/Nuke.Common/Tools/Unity/UnityProjectSettingsExtensions.cs deleted file mode 100644 index fe4533d5c..000000000 --- a/source/Nuke.Common/Tools/Unity/UnityProjectSettingsExtensions.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2023 Maintainers of NUKE. -// Distributed under the MIT License. -// https://github.com/nuke-build/nuke/blob/master/LICENSE - -using System; -using System.Linq; -using JetBrains.Annotations; - -namespace Nuke.Common.Tools.Unity; - -public static partial class UnityProjectSettingsExtensions -{ - #region BuildTarget - - ///

Sets .

Allows the selection of an active build target before a project is loaded.

- [Pure] - public static T SetBuildTarget(this T toolSettings, UnityBuildTarget buildTarget) - where T : UnityProjectSettings - { - return toolSettings.SetBuildTarget(buildTarget.ToString()); - } - - #endregion -} diff --git a/source/Nuke.Common/Tools/Unity/UnityRunTestsSettingsExtensions.cs b/source/Nuke.Common/Tools/Unity/UnityRunTestsSettingsExtensions.cs deleted file mode 100644 index ce2957c09..000000000 --- a/source/Nuke.Common/Tools/Unity/UnityRunTestsSettingsExtensions.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2023 Maintainers of NUKE. -// Distributed under the MIT License. -// https://github.com/nuke-build/nuke/blob/master/LICENSE - -using System; -using System.Linq; -using JetBrains.Annotations; - -namespace Nuke.Common.Tools.Unity; - -public static partial class UnityRunTestsSettingsExtensions -{ - #region TestPlatform - - /// - ///

Sets

- ///

The platform to run tests on.

- ///
- [Pure] - public static T SetTestPlatform(this T toolSettings, UnityTestPlatform testPlatform) - where T : UnityRunTestsSettings - { - return toolSettings.SetTestPlatform(testPlatform.ToString()); - } - - /// - ///

Sets

- ///

The platform to run tests on.

- ///
- [Pure] - public static T SetTestPlatform(this T toolSettings, UnityBuildTarget buildTarget) - where T : UnityRunTestsSettings - { - return toolSettings.SetTestPlatform(buildTarget.ToString()); - } - - #endregion -} diff --git a/source/Nuke.Common/Tools/Unity/UnityTasks.cs b/source/Nuke.Common/Tools/Unity/UnityTasks.cs index 7828f5fda..1caddee71 100644 --- a/source/Nuke.Common/Tools/Unity/UnityTasks.cs +++ b/source/Nuke.Common/Tools/Unity/UnityTasks.cs @@ -15,18 +15,27 @@ using Nuke.Tooling; using Nuke.Utilities.Text.Yaml; using Serilog; +using Serilog.Events; namespace Nuke.Common.Tools.Unity; -public class UnityTasks2 : ToolTasks +partial class UnityTasks { + [ThreadStatic] + private static FileWatcher s_watcher; + + [ThreadStatic] + private static LogParser s_logParser; + + private static bool s_minimalOutput; + protected override string GetToolPath(ToolOptions options = null) { - var unityOptions = (UnityBaseSettings)(object)options; + var unityOptions = options as UnityOptionsBase; var programFiles = EnvironmentInfo.IsWin ? EnvironmentInfo.SpecialFolder(EnvironmentInfo.Is32Bit ? SpecialFolders.ProgramFilesX86 : SpecialFolders.ProgramFiles) : null; - return unityOptions.HubVersion switch + return unityOptions?.HubVersion ?? GetEditorVersionFromProject() switch { { } version => EnvironmentInfo.Platform switch { @@ -41,110 +50,37 @@ protected override string GetToolPath(ToolOptions options = null) _ => null } }; - } - - protected override ToolOptions PreProcess(ToolOptions options) - { - return base.PreProcess(options); - } -} - -public partial class UnityTasks -{ - [ThreadStatic] - private static FileWatcher s_watcher; - - [ThreadStatic] - private static LogParser s_logParser; - - private static bool s_minimalOutput; - - public static string GetToolPath(string hubVersion = null) - { - return hubVersion != null - ? GetToolPathViaHubVersion(hubVersion) - : GetToolPathViaManualInstallation(); - } - - private static AbsolutePath GetToolPathViaManualInstallation() - { - return EnvironmentInfo.Platform switch - { - PlatformFamily.Windows => $@"{GetProgramFiles()}\Unity\Editor\Unity.exe", - PlatformFamily.OSX => "/Applications/Unity/Unity.app/Contents/MacOS/Unity", - _ => null - }; - } - private static AbsolutePath GetToolPathViaHubVersion(string version) - { - return EnvironmentInfo.Platform switch + string GetEditorVersionFromProject() { - PlatformFamily.Windows => $@"{GetProgramFiles()}\Unity\Hub\Editor\{version}\Editor\Unity.exe", - PlatformFamily.OSX => $"/Applications/Unity/Hub/Editor/{version}/Unity.app/Contents/MacOS/Unity", - _ => throw new Exception($"Cannot determine Unity Hub installation path for '{version}'.") - }; - } + if (options is not UnitySettings projectOptions) + return null; - private static string GetProgramFiles() - { - return EnvironmentInfo.SpecialFolder( - EnvironmentInfo.Is32Bit - ? SpecialFolders.ProgramFilesX86 - : SpecialFolders.ProgramFiles); - } - - private static void PreProcess(ref UnitySettings unitySettings) - { - if (unitySettings.ProjectPath == null) - Log.Warning("ProjectPath is not set, using last opened/built project"); - - DetectUnityVersion(ref unitySettings); - PreProcess(ref unitySettings); - } - - private static void DetectUnityVersion(ref UnitySettings unitySettings) - { - if (unitySettings.HubVersion != null || - unitySettings.ProjectPath == null) - return; - - var editorVersion = ReadUnityEditorVersion(unitySettings.ProjectPath); - var unityExecutable = GetToolPathViaHubVersion(editorVersion); - if (unityExecutable.Exists()) - { - unitySettings.HubVersion = editorVersion; - return; + var projectVersionFile = (AbsolutePath)projectOptions.ProjectPath / "ProjectSettings" / "ProjectVersion.txt"; + var properties = projectVersionFile.ReadYaml>(); + return properties["m_EditorVersion"]; } - - var manualInstallationToolPath = GetToolPathViaManualInstallation(); - Assert.FileExists(manualInstallationToolPath, $"Required Unity Hub installation for version '{editorVersion}' was not found"); } - private static string ReadUnityEditorVersion(AbsolutePath projectPath) + protected override ToolOptions PreProcess(ToolOptions options) { - var projectVersionFile = projectPath / "ProjectSettings" / "ProjectVersion.txt"; - var properties = projectVersionFile.ReadYaml>(); - return properties["m_EditorVersion"]; - } + var unityOptions = (UnityOptionsBase)options; + var logFile = (AbsolutePath)unityOptions.LogFile ?? NukeBuild.TemporaryDirectory / "unity.log"; + logFile.DeleteFile(); - private static void PreProcess(ref T unitySettings) - where T : UnityBaseSettings - { - if (File.Exists(unitySettings.GetLogFile())) - File.Delete(unitySettings.GetLogFile()); - s_minimalOutput = unitySettings.MinimalOutput.GetValueOrDefault(defaultValue: false); + s_minimalOutput = unityOptions.MinimalOutput ?? false; s_logParser = new LogParser(LogLine, LogBlockStart, LogBlockEnd); - s_watcher = new FileWatcher(unitySettings.GetLogFile(), s_logParser.Log); + s_watcher = new FileWatcher(logFile, s_logParser.Log); s_watcher.Start(); + + return options; } - [CanBeNull] - private static IProcess StartProcess(UnityBaseSettings unitySettings) + protected override IReadOnlyCollection Run(ToolOptions options) { try { - return ProcessTasks.StartProcess(unitySettings); + return base.Run(options); } catch (Exception) { @@ -153,47 +89,46 @@ private static IProcess StartProcess(UnityBaseSettings unitySettings) } } - private static void AssertWatcherStopped() + protected override Func GetExitHandler(ToolOptions options = null) { - s_watcher?.AssertStopped(); - s_watcher = null; + var unityOptions = options as UnityOptionsBase; + return process => + { + AssertWatcherStopped(); + if (process.ExitCode == 0) + return null; + + var message = new StringBuilder() + .AppendLine($"Process '{Path.GetFileName(process.FileName)}' exited with code {process.ExitCode}. Verify the invocation.") + .AppendLine($"> {process.FileName.DoubleQuoteIfNeeded()} {process.Arguments}") + .ToString(); + + if (unityOptions?.StableExitCodes.Any(x => x == process.ExitCode) ?? false) + Log.Warning(message); + else + Assert.Fail(message); + + return null; + }; } - private static void AssertProcess(IProcess process, UnityBaseSettings settings) + private static void AssertWatcherStopped() { - AssertWatcherStopped(); - if (process.ExitCode == 0) - return; - - var message = new StringBuilder() - .AppendLine($"Process '{Path.GetFileName(process.FileName)}' exited with code {process.ExitCode}. Verify the invocation.") - .AppendLine($"> {process.FileName.DoubleQuoteIfNeeded()} {process.Arguments}") - .ToString(); - - if (settings.StableExitCodes.Any(x => x == process.ExitCode)) - Log.Warning(message); - else - Assert.Fail(message); + s_watcher?.AssertStopped(); + s_watcher = null; } private static void LogLine(string message, Logging.LogLevel logLevel) { - switch (logLevel) - { - case Logging.LogLevel.Normal: - if (!s_minimalOutput) - Log.Debug(message); - break; - case Logging.LogLevel.Warning: - Log.Warning(message); - break; - case Logging.LogLevel.Error: - case Logging.LogLevel.Failure: - Log.Error(message); - break; - default: - throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, message: null); - } + Log.Write( + logLevel switch + { + Logging.LogLevel.Normal => LogEventLevel.Debug, + Logging.LogLevel.Warning => LogEventLevel.Warning, + Logging.LogLevel.Error or Logging.LogLevel.Failure => LogEventLevel.Error, + _ => throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null) + }, + message); } private static void LogBlockEnd(MatchedBlock block) diff --git a/source/Nuke.Tooling/New/ToolTasks.Run.cs b/source/Nuke.Tooling/New/ToolTasks.Run.cs index d3d8d1a48..b9584d4ce 100644 --- a/source/Nuke.Tooling/New/ToolTasks.Run.cs +++ b/source/Nuke.Tooling/New/ToolTasks.Run.cs @@ -13,7 +13,7 @@ namespace Nuke.Tooling; partial class ToolTasks { - protected IReadOnlyCollection Run(ToolOptions options) + protected virtual IReadOnlyCollection Run(ToolOptions options) { var secrets = options.GetSecrets().ToList(); string Filter(string text) => secrets.Aggregate(text, (str, s) => str.Replace(s, "[REDACTED]")); @@ -35,7 +35,7 @@ protected IReadOnlyCollection Run(ToolOptions options) return process.Output; } - protected (TResult Result, IReadOnlyCollection Output) Run(ToolOptions options) + protected virtual (TResult Result, IReadOnlyCollection Output) Run(ToolOptions options) { var output = Run(options); try