We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b5be1b + 2bbbff7 commit 2f3d639Copy full SHA for 2f3d639
UnitySetup/UnitySetup.psm1
@@ -264,10 +264,11 @@ function Get-UnityEditor {
264
foreach ($p in $Path) {
265
switch ($currentOS) {
266
([OperatingSystem]::Windows) {
267
- $editor = Get-ChildItem "$p" -Filter 'Unity.exe' -Recurse |
268
- Select-Object -First 1 -ExpandProperty FullName
269
-
270
- Write-Output $editor
+ $editor = Join-Path "$p" 'Editor\Unity.exe'
+
+ if (Test-Path $editor) {
+ Write-Output (Resolve-Path $editor).Path
271
+ }
272
}
273
([OperatingSystem]::Linux) {
274
throw "Get-UnityEditor has not been implemented on the Linux platform. Contributions welcomed!";
0 commit comments