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.mappull/705/head
parent
3b26780ddf
commit
a1ebdb7abd
|
@ -6548,6 +6548,7 @@ class ImageTag {
|
|||
android: 'android',
|
||||
ios: 'ios',
|
||||
tvos: 'appletv',
|
||||
visionos: 'visionos',
|
||||
facebook: 'facebook',
|
||||
};
|
||||
}
|
||||
|
@ -6565,7 +6566,7 @@ class ImageTag {
|
|||
}
|
||||
}
|
||||
static getTargetPlatformToTargetPlatformSuffixMap(platform, version, providerStrategy) {
|
||||
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));
|
||||
// @see: https://docs.unity3d.com/ScriptReference/BuildTarget.html
|
||||
switch (platform) {
|
||||
|
@ -6617,6 +6618,11 @@ class ImageTag {
|
|||
throw new Error(`tvOS can only be built on Windows or macOS base OS`);
|
||||
}
|
||||
return tvos;
|
||||
case platform_1.default.types.VisionOS:
|
||||
if (process.platform !== 'darwin') {
|
||||
throw new Error(`visionOS can only be built on a macOS base OS`);
|
||||
}
|
||||
return visionos;
|
||||
case platform_1.default.types.Switch:
|
||||
return windows;
|
||||
// Unsupported
|
||||
|
@ -7398,6 +7404,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;
|
||||
|
@ -7610,6 +7619,7 @@ class Platform {
|
|||
PS4: 'PS4',
|
||||
XboxOne: 'XboxOne',
|
||||
tvOS: 'tvOS',
|
||||
VisionOS: 'VisionOS',
|
||||
Switch: 'Switch',
|
||||
// Unsupported
|
||||
Lumin: 'Lumin',
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -16,6 +16,7 @@ class Platform {
|
|||
PS4: 'PS4',
|
||||
XboxOne: 'XboxOne',
|
||||
tvOS: 'tvOS',
|
||||
VisionOS: 'VisionOS',
|
||||
Switch: 'Switch',
|
||||
|
||||
// Unsupported
|
||||
|
|
Loading…
Reference in New Issue