|
1 | | -export type UnityEditorInfo = Record<string, string>; |
2 | | - |
| 1 | +/** |
| 2 | + * Interface representing a Unity project as stored in Unity Hub |
| 3 | + * Contains metadata about a project tracked by Unity Hub |
| 4 | + */ |
3 | 5 | export interface UnityHubProject { |
| 6 | + /** Project name */ |
4 | 7 | title: string; |
| 8 | + |
| 9 | + /** Timestamp of last modification (in milliseconds since epoch) */ |
5 | 10 | lastModified: number; |
| 11 | + |
| 12 | + /** Whether the project uses a custom editor (non-standard Unity version) */ |
6 | 13 | isCustomEditor: boolean; |
| 14 | + |
| 15 | + /** Full path to the project folder */ |
7 | 16 | path: string; |
| 17 | + |
| 18 | + /** Path to the parent folder containing the project */ |
8 | 19 | containingFolderPath: string; |
| 20 | + |
| 21 | + /** Unity version used by the project (e.g., "2023.3.0f1") */ |
9 | 22 | version: string; |
| 23 | + |
| 24 | + /** CPU architecture of the Unity editor (e.g., "x64") */ |
10 | 25 | architecture: string; |
| 26 | + |
| 27 | + /** Specific Unity changeset hash for this version */ |
11 | 28 | changeset: string; |
| 29 | + |
| 30 | + /** Whether the project is marked as favorite in Unity Hub */ |
12 | 31 | isFavorite: boolean; |
| 32 | + |
| 33 | + /** Unique identifier for the project used locally */ |
13 | 34 | localProjectId: string; |
| 35 | + |
| 36 | + /** Whether Unity Cloud services are enabled for this project */ |
14 | 37 | cloudEnabled: boolean; |
15 | 38 | } |
16 | 39 |
|
| 40 | +/** |
| 41 | + * Interface representing the structure of the Unity Hub projects list file |
| 42 | + * Contains an array of Unity projects tracked by Unity Hub |
| 43 | + */ |
17 | 44 | export interface UnityHubProjectsList { |
| 45 | + /** Array of Unity projects */ |
18 | 46 | data: UnityHubProject[]; |
19 | 47 | } |
20 | 48 |
|
21 | 49 | export enum UnityModules { |
| 50 | + /** Unity documentation */ |
22 | 51 | Documentation = "documentation", |
| 52 | + |
| 53 | + /** Android build support module */ |
23 | 54 | AndroidBuildSupport = "android", |
| 55 | + |
| 56 | + /** Android SDK and NDK tools child modules */ |
24 | 57 | AndroidSDKNDKTools = "android-sdk-ndk-tools", |
| 58 | + |
| 59 | + /** OpenJDK for Android development */ |
25 | 60 | OpenJDK = "android-open-jdk", |
| 61 | + |
| 62 | + /** iOS build support module */ |
26 | 63 | IOSBuildSupport = "ios", |
| 64 | + |
| 65 | + /** tvOS build support module */ |
27 | 66 | TvOSBuildSupport = "appletv", |
| 67 | + |
| 68 | + /** Linux build support with Mono scripting backend */ |
28 | 69 | LinuxBuildSupportMono = "linux-mono", |
| 70 | + |
| 71 | + /** Linux build support with IL2CPP scripting backend */ |
29 | 72 | LinuxBuildSupportIL2CPP = "linux-il2cpp", |
| 73 | + |
| 74 | + /** WebGL build support module */ |
30 | 75 | WebGLBuildSupport = "webgl", |
| 76 | + |
| 77 | + /** Generic Windows build support */ |
31 | 78 | WindowsBuildSupport = "windows", |
| 79 | + |
| 80 | + /** Vuforia Augmented Reality support */ |
32 | 81 | VuforiaAR = "vuforia-ar", |
| 82 | + |
| 83 | + /** Windows build support with Mono scripting backend */ |
33 | 84 | WindowsBuildSupportMono = "windows-mono", |
| 85 | + |
| 86 | + /** Lumin (Magic Leap) build support */ |
34 | 87 | LuminBuildSupport = "lumin", |
| 88 | + |
| 89 | + /** Visual Studio Community integration */ |
35 | 90 | VisualStudioCommunity = "visualstudio", |
| 91 | + |
| 92 | + /** macOS build support with Mono scripting backend */ |
36 | 93 | MacBuildSupportMono = "mac-mono", |
| 94 | + |
| 95 | + /** macOS build support with IL2CPP scripting backend */ |
37 | 96 | MacBuildSupportIL2CPP = "mac-il2cpp", |
| 97 | + |
| 98 | + /** Universal Windows Platform support */ |
38 | 99 | UniversalWindowsPlatform = "universal-windows-platform", |
| 100 | + |
| 101 | + /** Universal Windows Platform build support with IL2CPP */ |
39 | 102 | UWPBuildSupportIL2CPP = "uwp-il2cpp", |
| 103 | + |
| 104 | + /** Universal Windows Platform build support with .NET */ |
40 | 105 | UWPBuildSupportDotNet = "uwp-.net", |
41 | 106 | } |
42 | 107 |
|
| 108 | +/** |
| 109 | + * Enum for language packs that can be installed for Unity Editor |
| 110 | + * These values correspond to the language module IDs used in Unity Hub CLI commands |
| 111 | + */ |
43 | 112 | export enum UnityEditorLanguages { |
| 113 | + /** Japanese language pack */ |
44 | 114 | Japanese = "language-ja", |
| 115 | + |
| 116 | + /** Korean language pack */ |
45 | 117 | Korean = "language-ko", |
| 118 | + |
| 119 | + /** Simplified Chinese language pack */ |
46 | 120 | ChineseSimplified = "language-zh-hans", |
| 121 | + |
| 122 | + /** Traditional Chinese language pack */ |
47 | 123 | ChineseTraditional = "language-zh-hant", |
| 124 | + |
| 125 | + /** Chinese language pack (mainland China) */ |
48 | 126 | Chinese = "language-zh-cn", |
49 | 127 | } |
50 | 128 |
|
| 129 | +/** |
| 130 | + * Enum for Unity Editor architectures |
| 131 | + * These values correspond to the architecture module IDs used in Unity Hub CLI commands |
| 132 | + */ |
51 | 133 | export enum EditorArchitecture { |
52 | 134 | x86_64 = "x86_64", |
53 | 135 | arm64 = "arm64", |
54 | 136 | } |
55 | 137 |
|
| 138 | +/** |
| 139 | + * Union type for all Unity module IDs (both regular modules and language packs) |
| 140 | + * Used when adding modules to Unity installations |
| 141 | + */ |
56 | 142 | export type ModuleId = UnityModules | UnityEditorLanguages; |
| 143 | + |
57 | 144 | export type UnityInstallations = Record<string, string>; |
58 | 145 |
|
| 146 | +/** |
| 147 | + * Type representing a mapping of Unity versions to their installation paths |
| 148 | + * Example: { "2023.3.0f1": "C:/Program Files/Unity/Hub/Editor/2023.3.0f1" } |
| 149 | + */ |
| 150 | +export type UnityEditorInfo = Record<string, string>; |
| 151 | + |
59 | 152 | //EDITOR |
| 153 | + |
60 | 154 | export interface ProjectInfo { |
61 | 155 | projectName: string; |
62 | 156 | projectPath: string; |
63 | 157 | editorVersion: string; |
64 | | - scenes?: string[]; |
65 | 158 | } |
66 | 159 |
|
67 | | -// Ref https://docs.unity3d.com/Packages/com.unity.test-framework@1.4/manual/reference-command-line.html#testplatform |
| 160 | +// |
| 161 | +/** Enum for Unity test platforms |
| 162 | + * These values correspond to the test platform options used in Unity CLI commands |
| 163 | + * and are used to specify the type for running tests. |
| 164 | + * @link https://docs.unity3d.com/Packages/com.unity.test-framework@1.4/manual/reference-command-line.html#testplatform |
| 165 | + */ |
68 | 166 | export enum TestMode { |
| 167 | + /** Play mode test platform */ |
69 | 168 | EditMode = "editmode", |
| 169 | + /** Play mode test platform */ |
70 | 170 | PlayMode = "playmode", |
71 | 171 | } |
72 | 172 |
|
73 | | -// Ref: https://docs.unity3d.com/ScriptReference/BuildTarget.html |
| 173 | +/** |
| 174 | + * Enum for Unity build targets |
| 175 | + * These values correspond to the build target options used in Unity CLI commands |
| 176 | + * @link https://docs.unity3d.com/ScriptReference/BuildTarget.html |
| 177 | + */ |
74 | 178 | export enum UnityBuildTarget { |
| 179 | + /** Standalone OS X build target */ |
75 | 180 | StandaloneOSX = "StandaloneOSX", |
| 181 | + |
| 182 | + /** Standalone Windows build target */ |
76 | 183 | StandaloneWindows = "StandaloneWindows", |
| 184 | + |
| 185 | + /** iOS build target */ |
77 | 186 | iOS = "iOS", |
| 187 | + |
| 188 | + /** Android build target */ |
78 | 189 | Android = "Android", |
| 190 | + |
| 191 | + /** Standalone Windows 64-bit build target */ |
79 | 192 | StandaloneWindows64 = "StandaloneWindows64", |
| 193 | + |
| 194 | + /** WebGL build target */ |
80 | 195 | WebGL = "WebGL", |
| 196 | + |
| 197 | + /** Windows Store App build target */ |
81 | 198 | WSAPlayer = "WSAPlayer", |
| 199 | + |
82 | 200 | StandaloneLinux64 = "StandaloneLinux64", |
| 201 | + |
| 202 | + /** PlayStation 4 build target */ |
83 | 203 | PS4 = "PS4", |
| 204 | + |
| 205 | + /** Xbox One build target */ |
84 | 206 | XboxOne = "XboxOne", |
| 207 | + |
| 208 | + /** tvOS build target */ |
85 | 209 | tvOS = "tvOS", |
| 210 | + |
| 211 | + /** Switch build target */ |
86 | 212 | Switch = "Switch", |
| 213 | + |
| 214 | + /** Linux Headless build target */ |
87 | 215 | LinuxHeadlessSimulation = "LinuxHeadlessSimulation", |
| 216 | + |
| 217 | + /** PlayStation 5 build target */ |
88 | 218 | PS5 = "PS5", |
| 219 | + |
| 220 | + /** VisionOS build target */ |
89 | 221 | VisionOS = "VisionOS", |
90 | 222 | } |
0 commit comments