File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class UnitySetupInstance {
50
50
51
51
UnitySetupInstance([string ]$path ) {
52
52
$currentOS = Get-OperatingSystem
53
+ $foundVersion = $false
53
54
54
55
if ( Test-Path " $path \modules.json" ) {
55
56
$modules = (Get-Content " $path \modules.json" - Raw) | ConvertFrom-Json
@@ -59,6 +60,7 @@ class UnitySetupInstance {
59
60
60
61
if ( $null -ne $match ) {
61
62
$this.Version = [UnityVersion ]$match
63
+ $foundVersion = $true
62
64
break
63
65
}
64
66
}
@@ -70,10 +72,11 @@ class UnitySetupInstance {
70
72
if ( $null -ne $ivy ) {
71
73
[xml ]$xmlDoc = Get-Content $ivy.FullName
72
74
$this.Version = [UnityVersion ]$xmlDoc .' ivy-module' .info.unityVersion
75
+ $foundVersion = $true
73
76
}
74
77
}
75
78
76
- if ( $this .Version -ne $null ) {
79
+ if ( $foundVersion -eq $false ) {
77
80
throw " Failed to find a valid version identifier for installation at $path !" ;
78
81
}
79
82
@@ -1105,6 +1108,7 @@ function Get-UnitySetupInstance {
1105
1108
$setupInstances = [UnitySetupInstance []]@ ()
1106
1109
1107
1110
foreach ( $path in $searchPaths ) {
1111
+ if ( $path -like ' *Unity Hub*' ) { continue }
1108
1112
$setupInstances += , [UnitySetupInstance ]::new($path )
1109
1113
}
1110
1114
You can’t perform that action at this time.
0 commit comments