mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-01-31 05:19:09 +08:00
Build parameters have to be parsed because they can no longer be implicitly passed, as they need to be interpreted for detecting extensions.
52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
class Platform {
|
|
static get default() {
|
|
return Platform.types.StandaloneWindows64;
|
|
}
|
|
|
|
static get types() {
|
|
return {
|
|
StandaloneOSX: 'StandaloneOSX',
|
|
StandaloneWindows: 'StandaloneWindows',
|
|
StandaloneWindows64: 'StandaloneWindows64',
|
|
StandaloneLinux64: 'StandaloneLinux64',
|
|
iOS: 'iOS',
|
|
Android: 'Android',
|
|
WebGL: 'WebGL',
|
|
WSAPlayer: 'WSAPlayer',
|
|
PS4: 'PS4',
|
|
XboxOne: 'XboxOne',
|
|
tvOS: 'tvOS',
|
|
Switch: 'Switch',
|
|
// Unsupported
|
|
Lumin: 'Lumin',
|
|
BJM: 'BJM',
|
|
Stadia: 'Stadia',
|
|
Facebook: 'Facebook',
|
|
NoTarget: 'NoTarget',
|
|
// Test specific
|
|
Test: 'Test',
|
|
};
|
|
}
|
|
|
|
static isWindows(platform) {
|
|
switch (platform) {
|
|
case Platform.types.StandaloneWindows:
|
|
case Platform.types.StandaloneWindows64:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
static isAndroid(platform) {
|
|
switch (platform) {
|
|
case Platform.types.Android:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
export default Platform;
|