File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -256,13 +256,18 @@ function Start-UnityEditor
256
256
257
257
if ( $Instance -eq $null )
258
258
{
259
- $Instance = Get-UnitySetupInstance | Select-UnitySetupInstance - Project $Project
259
+ $version = Get-UnityProjectInstance - BasePath $Project | Select-Object - First 1 - ExpandProperty UnityInstanceVersion
260
+ $Instance = Get-UnitySetupInstance | Select-UnitySetupInstance - Version $version
261
+ }
262
+ else
263
+ {
264
+ $version = $Instance.InstallationVersion
260
265
}
261
266
262
267
$unityPath = $Instance.InstallationPath
263
268
264
269
if ( ! $unityPath -or $unityPath -eq " " ) {
265
- throw " Could not find Unity editor for $ ( $Instance .InstallationVersion ) "
270
+ throw " Could not find Unity Editor for version $version "
266
271
}
267
272
268
273
$editor = Get-ChildItem " $unityPath " - Filter Unity.exe - Recurse | Select-Object - First 1 - ExpandProperty FullName
You can’t perform that action at this time.
0 commit comments