Skip to content

Commit a1ebdb7

Browse files
authored
Adds support for VisionOS in UnityHub in macos (#710)
* Adds support for VisionOS in UnityHub in macos * Adds support for VisionOS in UnityHub in macos * Syncs index.js.map
1 parent 3b26780 commit a1ebdb7

File tree

5 files changed

+38
-4
lines changed

5 files changed

+38
-4
lines changed

dist/index.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/model/image-tag.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class ImageTag {
5858
android: 'android',
5959
ios: 'ios',
6060
tvos: 'appletv',
61+
visionos: 'visionos',
6162
facebook: 'facebook',
6263
};
6364
}
@@ -82,8 +83,21 @@ class ImageTag {
8283
version: string,
8384
providerStrategy: string,
8485
): string {
85-
const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook } =
86-
ImageTag.targetPlatformSuffixes;
86+
const {
87+
generic,
88+
webgl,
89+
mac,
90+
windows,
91+
windowsIl2cpp,
92+
wsaPlayer,
93+
linux,
94+
linuxIl2cpp,
95+
android,
96+
ios,
97+
tvos,
98+
visionos,
99+
facebook,
100+
} = ImageTag.targetPlatformSuffixes;
87101

88102
const [major, minor] = version.split('.').map((digit) => Number(digit));
89103

@@ -141,6 +155,12 @@ class ImageTag {
141155
}
142156

143157
return tvos;
158+
case Platform.types.VisionOS:
159+
if (process.platform !== 'darwin') {
160+
throw new Error(`visionOS can only be built on a macOS base OS`);
161+
}
162+
163+
return visionos;
144164
case Platform.types.Switch:
145165
return windows;
146166

src/model/platform-setup/setup-mac.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class SetupMac {
103103
case 'tvOS':
104104
moduleArgument.push('--module', 'appletv');
105105
break;
106+
case 'VisionOS':
107+
moduleArgument.push('--module', 'visionos');
108+
break;
106109
case 'StandaloneOSX':
107110
moduleArgument.push('--module', 'mac-il2cpp');
108111
break;

src/model/platform.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Platform {
1616
PS4: 'PS4',
1717
XboxOne: 'XboxOne',
1818
tvOS: 'tvOS',
19+
VisionOS: 'VisionOS',
1920
Switch: 'Switch',
2021

2122
// Unsupported

0 commit comments

Comments
 (0)