Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ Launch many projects at the same time:
```powershell
Get-UnityProjectInstance -Recurse | Start-UnityEditor
```
Invoke methods with arbitrary arguments:
```powershell
Start-UnityEditor -ExecuteMethod Build.Invoke -BatchMode -Quit -LogFile .\build.log -Wait -AdditionalArguments "-BuildArg1 -BuildArg2"
```
Find the installers for a particular version:
```powershell
Find-UnitySetupInstaller -Version '2017.3.0f3' | Format-Table
Expand Down
2 changes: 1 addition & 1 deletion UnitySetup/UnitySetup.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
RootModule = 'UnitySetup'

# Version number of this module.
ModuleVersion = '5.0'
ModuleVersion = '5.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
7 changes: 6 additions & 1 deletion UnitySetup/UnitySetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,8 @@ function Get-UnityProjectInstance {
Force operation as though $PWD is not a unity project.
.PARAMETER ExecuteMethod
The script method for the Unity Editor to execute.
.PARAMETER AdditionalArguments
Additional arguments for Unity or your custom method
.PARAMETER OutputPath
The output path that the Unity Editor should use.
.PARAMETER LogFile
Expand Down Expand Up @@ -795,7 +797,7 @@ function Get-UnityProjectInstance {
.EXAMPLE
Start-UnityEditor -Version 2017.3.0f3
.EXAMPLE
Start-UnityEditor -ExecuteMethod Build.Invoke -BatchMode -Quit -LogFile .\build.log -Wait
Start-UnityEditor -ExecuteMethod Build.Invoke -BatchMode -Quit -LogFile .\build.log -Wait -AdditionalArguments "-BuildArg1 -BuildArg2"
.EXAMPLE
Get-UnityProjectInstance -Recurse | Start-UnityEditor -BatchMode -Quit
.EXAMPLE
Expand Down Expand Up @@ -825,6 +827,8 @@ function Start-UnityEditor {
[parameter(Mandatory = $false)]
[string]$ExecuteMethod,
[parameter(Mandatory = $false)]
[string]$AdditionalArguments,
[parameter(Mandatory = $false)]
[string[]]$ExportPackage,
[parameter(Mandatory = $false)]
[string]$ImportPackage,
Expand Down Expand Up @@ -962,6 +966,7 @@ function Start-UnityEditor {
if ( $TestResults ) { $sharedArgs += '-testResults', $TestResults }
if ( $RunTests ) { $sharedArgs += '-runTests' }
if ( $ForceFree) { $sharedArgs += '-force-free' }
if ( $AdditionalArguments) { $sharedArgs += $AdditionalArguments }
Comment thread
jwittner marked this conversation as resolved.
Resolved

$instanceArgs = @()
foreach ( $p in $projectInstances ) {
Expand Down