File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,7 @@ class UnitySetupInstance {
52
52
$version = $null
53
53
$currentOS = Get-OperatingSystem
54
54
55
- # First we'll attempt to search for the version using the ivy.xml definitions for legacy editor compatibility.
56
- $ivy = Get-ChildItem - Path $path - Filter ivy.xml - Recurse - ErrorAction SilentlyContinue - Force | Select-Object - First 1
57
-
58
- if ( Test-Path $ivy.FullName ) {
59
- [xml ]$xmlDoc = Get-Content $ivy.FullName
60
- $version = [UnityVersion ]$xmlDoc .' ivy-module' .info.unityVersion
61
- }
62
- else {
63
- # No ivy files found, so search the new modules.json for the version
55
+ if ( Test-Path " $path \modules.json" ) {
64
56
$modules = (Get-Content " $path \modules.json" - Raw) | ConvertFrom-Json
65
57
66
58
foreach ( $module in $modules ) {
@@ -72,6 +64,15 @@ class UnitySetupInstance {
72
64
}
73
65
}
74
66
}
67
+ else {
68
+ # We'll attempt to search for the version using the ivy.xml definitions for legacy editor compatibility.
69
+ $ivy = Get-ChildItem - Path $path - Filter ivy.xml - Recurse - ErrorAction SilentlyContinue - Force | Select-Object - First 1
70
+
71
+ if ( Test-Path $ivy.FullName ) {
72
+ [xml ]$xmlDoc = Get-Content $ivy.FullName
73
+ $version = [UnityVersion ]$xmlDoc .' ivy-module' .info.unityVersion
74
+ }
75
+ }
75
76
76
77
if ( $version -eq $null ) {
77
78
throw " Failed to find a valid installation at $path !" ;
You can’t perform that action at this time.
0 commit comments