Skip to content

Commit 70edffb

Browse files
committed
- Addesses PR feedback and exposes / documents methods that users could leverage in external scripts.
1 parent 0b09ecd commit 70edffb

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

UnitySetup/UnitySetup.psd1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,11 @@
7676

7777
FunctionsToExport = @(
7878
'Find-UnitySetupInstaller',
79+
'Select-UnitySetupInstaller',
80+
'Test-UnitySetupInstance',
7981
'Get-UnityProjectInstance',
8082
'Get-UnitySetupInstance',
83+
'Request-UnitySetupInstaller',
8184
'Install-UnitySetupInstance',
8285
'Select-UnitySetupInstance',
8386
'Uninstall-UnitySetupInstance',

UnitySetup/UnitySetup.psm1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,22 @@ function Find-UnitySetupInstaller {
432432
} | Sort-Object -Property ComponentType
433433
}
434434

435+
<#
436+
.Synopsis
437+
Test if a Unity instance is installed.
438+
.DESCRIPTION
439+
Returns the status of a Unity install by Version and/or Path to install.
440+
.PARAMETER Version
441+
What version of Unity are you looking for?
442+
.PARAMETER BasePath
443+
Under what base patterns is Unity customly installed at.
444+
.PARAMETER Path
445+
Exact path you expect Unity to be installed at.
446+
.EXAMPLE
447+
Test-UnitySetupInstance -Version 2017.3.0f3
448+
.EXAMPLE
449+
Test-UnitySetupInstance -BasePath D:/UnityInstalls/Unity2018
450+
#>
435451
function Test-UnitySetupInstance {
436452
[CmdletBinding()]
437453
param(
@@ -533,6 +549,21 @@ function Format-BitsPerSecond {
533549
)
534550
}
535551

552+
<#
553+
.Synopsis
554+
Download specified Unity installers.
555+
.DESCRIPTION
556+
Filters a list of `UnitySetupInstaller` down to a specific version and/or specific components.
557+
.PARAMETER Installers
558+
List of installers that needs to be downloaded.
559+
.PARAMETER Cache
560+
File path where installers will be downloaded to.
561+
.EXAMPLE
562+
$installers = Find-UnitySetupInstaller -Version 2017.3.0f3
563+
Request-UnitySetupInstaller -Installers $installers
564+
.EXAMPLE
565+
Find-UnitySetupInstaller -Version 2017.3.0f3 | Request-UnitySetupInstaller
566+
#>
536567
function Request-UnitySetupInstaller {
537568
[CmdletBinding()]
538569
param(

0 commit comments

Comments
 (0)