@@ -19,7 +19,7 @@ enum UnitySetupComponentType
19
19
Mac = (1 -shl 11 )
20
20
Vuforia = (1 -shl 12 )
21
21
WebGL = (1 -shl 13 )
22
- All = (-1 )
22
+ All = (1 -shl 14 ) - 1
23
23
}
24
24
25
25
class UnitySetupInstaller
@@ -34,8 +34,9 @@ class UnitySetupInstaller
34
34
class UnitySetupInstance
35
35
{
36
36
[UnityVersion ]$Version
37
+ [UnitySetupComponentType ]$Components
37
38
[string ]$Path
38
-
39
+
39
40
UnitySetupInstance([string ]$path ) {
40
41
41
42
$ivyPath = [io.path ]::Combine(" $path " , ' Data\UnityExtensions\Unity\Networking\ivy.xml' );
@@ -44,10 +45,37 @@ class UnitySetupInstance
44
45
45
46
if ( ! ($xmlDoc .' ivy-module' .info.unityVersion)) {
46
47
throw " Unity setup ivy is missing version: $ivyPath "
47
- }
48
+ }
48
49
49
50
$this.Path = $path
50
51
$this.Version = $xmlDoc .' ivy-module' .info.unityVersion
52
+ $this.Components = [UnitySetupComponentType ]::Setup
53
+
54
+ $componentTests = @ {
55
+ [UnitySetupComponentType ]::Documentation = , " $Path \Data\Documentation" ;
56
+ [UnitySetupComponentType ]::StandardAssets = , " $Path \Standard Assets" ;
57
+ [UnitySetupComponentType ]::Windows_IL2CPP = , " $Path \Data\PlaybackEngines\windowsstandalonesupport\Variations\win32_development_il2cpp" ;
58
+ [UnitySetupComponentType ]::Metro = " $Path \Data\PlaybackEngines\MetroSupport\Templates\UWP_.NET_D3D" ,
59
+ " $Path \Data\PlaybackEngines\MetroSupport\Templates\UWP_D3D" ;
60
+ [UnitySetupComponentType ]::UWP_IL2CPP = , " $Path \Data\PlaybackEngines\MetroSupport\Templates\UWP_IL2CPP_D3D" ;
61
+ [UnitySetupComponentType ]::Android = , " $Path \Data\PlaybackEngines\AndroidPlayer" ;
62
+ [UnitySetupComponentType ]::iOS = , " $Path \Data\PlaybackEngines\iOSSupport" ;
63
+ [UnitySetupComponentType ]::AppleTV = , " $Path \Data\PlaybackEngines\AppleTVSupport" ;
64
+ [UnitySetupComponentType ]::Facebook = , " $Path \Data\PlaybackEngines\Facebook" ;
65
+ [UnitySetupComponentType ]::Linux = , " $Path \Data\PlaybackEngines\LinuxStandaloneSupport" ;
66
+ [UnitySetupComponentType ]::Mac = , " $Path \Data\PlaybackEngines\MacStandaloneSupport" ;
67
+ [UnitySetupComponentType ]::Vuforia = , " $Path \Data\PlaybackEngines\VuforiaSupport" ;
68
+ [UnitySetupComponentType ]::WebGL = , " $Path \Data\PlaybackEngines\WebGLSupport" ;
69
+ }
70
+
71
+ $componentTests.Keys | ForEach-Object {
72
+ foreach ( $test in $componentTests [$_ ] ) {
73
+ if ( Test-Path - PathType Container - Path $test ) {
74
+ $this.Components += $_
75
+ break ;
76
+ }
77
+ }
78
+ }
51
79
}
52
80
}
53
81
0 commit comments