File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -471,11 +471,26 @@ function Get-UnitySetupInstance {
471
471
[CmdletBinding ()]
472
472
param (
473
473
[parameter (Mandatory = $false )]
474
- [string []] $BasePath = @ ( ' C:\Program Files*\Unity* ' , ' C:\Program Files\Unity\Hub\Editor\* ' )
474
+ [string []] $BasePath
475
475
)
476
476
477
+ # Windows
478
+ if ((-not $PSVersionTable.Platform ) -or ($PSVersionTable.Platform -eq " Win32NT" )) {
479
+ if (-not $BasePath ) {
480
+ $BasePath = @ (' C:\Program Files*\Unity*' , ' C:\Program Files\Unity\Hub\Editor\*' )
481
+ }
482
+ $ivyPath = ' Editor\Data\UnityExtensions\Unity\Networking\ivy.xml'
483
+ }
484
+ # Mac or Linux
485
+ else {
486
+ if (-not $BasePath ) {
487
+ $BasePath = @ (' /Applications/Unity*' )
488
+ }
489
+ $ivyPath = ' Unity.app/Contents/UnityExtensions/Unity/Networking/ivy.xml'
490
+ }
491
+
477
492
foreach ( $folder in $BasePath ) {
478
- $path = [io.path ]::Combine(" $folder " , ' Editor\Data\UnityExtensions\Unity\Networking\ivy.xml ' );
493
+ $path = [io.path ]::Combine(" $folder " , $ivyPath );
479
494
480
495
Get-ChildItem $path - Recurse - ErrorAction Ignore |
481
496
ForEach-Object {
You can’t perform that action at this time.
0 commit comments