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
This commit is contained in:
Daniel Lupiañez Casares 2025-06-07 20:20:18 +02:00 committed by GitHub
parent 3b26780ddf
commit a1ebdb7abd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 26 additions and 2 deletions

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View File

@ -58,6 +58,7 @@ class ImageTag {
android: 'android',
ios: 'ios',
tvos: 'appletv',
visionos: 'visionos',
facebook: 'facebook',
};
}
@ -82,8 +83,21 @@ class ImageTag {
version: string,
providerStrategy: string,
): string {
const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook } =
ImageTag.targetPlatformSuffixes;
const {
generic,
webgl,
mac,
windows,
windowsIl2cpp,
wsaPlayer,
linux,
linuxIl2cpp,
android,
ios,
tvos,
visionos,
facebook,
} = ImageTag.targetPlatformSuffixes;
const [major, minor] = version.split('.').map((digit) => Number(digit));
@ -141,6 +155,12 @@ class ImageTag {
}
return tvos;
case Platform.types.VisionOS:
if (process.platform !== 'darwin') {
throw new Error(`visionOS can only be built on a macOS base OS`);
}
return visionos;
case Platform.types.Switch:
return windows;

View File

@ -103,6 +103,9 @@ class SetupMac {
case 'tvOS':
moduleArgument.push('--module', 'appletv');
break;
case 'VisionOS':
moduleArgument.push('--module', 'visionos');
break;
case 'StandaloneOSX':
moduleArgument.push('--module', 'mac-il2cpp');
break;

View File

@ -16,6 +16,7 @@ class Platform {
PS4: 'PS4',
XboxOne: 'XboxOne',
tvOS: 'tvOS',
VisionOS: 'VisionOS',
Switch: 'Switch',
// Unsupported