1 | (function (factory) {
|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
3 | var v = factory(require, exports);
|
4 | if (v !== undefined) module.exports = v;
|
5 | } else if (typeof define === "function" && define.amd) {
|
6 | define(["require", "exports", "@spicypixel/core-kit-js/lib/operating-system"], factory);
|
7 | }
|
8 | })(function (require, exports) {
|
9 | "use strict";
|
10 |
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | const operating_system_1 = require("@spicypixel/core-kit-js/lib/operating-system");
|
13 | class UnityEditor {
|
14 | constructor() {
|
15 | throw new Error("This class is static and not meant to be constructed");
|
16 | }
|
17 | static get editorPath() {
|
18 | let platform = operating_system_1.OperatingSystemProvider.default.platform;
|
19 | let arch = operating_system_1.OperatingSystemProvider.default.architecture;
|
20 | if (platform === operating_system_1.Platform.Darwin) return "/Applications/Unity/Unity.app/Contents/MacOS/Unity";
|
21 | if (platform === operating_system_1.Platform.Win32 && arch === operating_system_1.Architecture.X64) return "C:\\Program Files\\Unity\\Editor\\Unity.exe";
|
22 | if (platform === operating_system_1.Platform.Win32 && arch !== operating_system_1.Architecture.X64) return "C:\\Program Files (x86)\\Unity\\Editor\\Unity.exe";
|
23 | throw new Error("Unsupported OS");
|
24 | }
|
25 | static get enginePath() {
|
26 | let platform = operating_system_1.OperatingSystemProvider.default.platform;
|
27 | let arch = operating_system_1.OperatingSystemProvider.default.architecture;
|
28 | if (platform === operating_system_1.Platform.Darwin) return "/Applications/Unity/Unity.app/Contents/Managed/UnityEngine.dll";
|
29 | throw new Error("Unsupported OS");
|
30 | }
|
31 | static get batchModeArgs() {
|
32 | return ["-batchmode", "-nographics", "-quit", "-silent-crashes", "-logFile"];
|
33 | }
|
34 | }
|
35 | exports.default = UnityEditor;
|
36 | });
|
37 |
|