File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ function Uninstall-UnitySetupInstance {
443
443
. DESCRIPTION
444
444
Get the Unity versions installed and their locations
445
445
. PARAMETER BasePath
446
- Under what base pattern should we look for Unity installs? Defaults to 'C:\Program Files*\Unity*'.
446
+ Under what base patterns should we look for Unity installs?
447
447
. EXAMPLE
448
448
Get-UnitySetupInstance
449
449
#>
@@ -452,15 +452,17 @@ function Get-UnitySetupInstance
452
452
[CmdletBinding ()]
453
453
param (
454
454
[parameter (Mandatory = $false )]
455
- [string ] $BasePath = ' C:\Program Files*\Unity*'
455
+ [string []] $BasePath = @ ( ' C:\Program Files*\Unity*' , ' C:\Program Files\Unity\Hub\Editor\* ' )
456
456
)
457
457
458
- $Path = [io.path ]::Combine(" $BasePath " , ' Editor\Data\UnityExtensions\Unity\Networking\ivy.xml' );
458
+ foreach ( $folder in $BasePath ) {
459
+ $path = [io.path ]::Combine(" $folder " , ' Editor\Data\UnityExtensions\Unity\Networking\ivy.xml' );
459
460
460
- Get-ChildItem $Path - Recurse - ErrorAction Ignore |
461
- ForEach-Object {
461
+ Get-ChildItem $path - Recurse - ErrorAction Ignore |
462
+ ForEach-Object {
462
463
[UnitySetupInstance ]::new((Join-Path $_.Directory " ..\..\..\..\" | Convert-Path ))
463
- }
464
+ }
465
+ }
464
466
}
465
467
466
468
<#
You can’t perform that action at this time.
0 commit comments