@notask/unity-cli-tools 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.0.5](https://github.com/NoTaskStudios/unity-cli-tools/compare/1.0.4...1.0.5) (2025-04-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Editor:** Force hubIPC and usehub to add projects ([1da532a](https://github.com/NoTaskStudios/unity-cli-tools/commit/1da532a5db4cb9d1e7404861e570633b4661be99))
7
+
1
8
  ## [1.0.4](https://github.com/NoTaskStudios/unity-cli-tools/compare/1.0.3...1.0.4) (2025-04-29)
2
9
 
3
10
 
@@ -239,7 +239,7 @@ class UnityEditor {
239
239
  return false;
240
240
  }
241
241
  }
242
- static async openProject(projectInfo, batchmode = false, waitForExit = true) {
242
+ static async openProject(projectInfo, useHub = true, batchmode = false, waitForExit = true) {
243
243
  try {
244
244
  console.debug(`Opening project at ${projectInfo.projectPath}`);
245
245
  const args = ["-projectPath", projectInfo.projectPath];
@@ -249,6 +249,9 @@ class UnityEditor {
249
249
  if (batchmode) {
250
250
  args.push("-batchmode");
251
251
  }
252
+ if (useHub) {
253
+ args.push(...["-useHub", "-hubIPC"]);
254
+ }
252
255
  const editorInfo = { version: projectInfo.editorVersion };
253
256
  const options = { reject: false };
254
257
  const { stdout, stderr } = await this.execUnityEditorCommand(editorInfo, args, options);
@@ -14,6 +14,6 @@ declare class UnityEditor {
14
14
  static exportPackage(projectInfo: ProjectInfo, assetPaths: string[], outputPath: string): Promise<boolean>;
15
15
  static importPackage(projectInfo: ProjectInfo, packagePath: string): Promise<boolean>;
16
16
  static createProject(projectInfo: ProjectInfo, waitForExit?: boolean): Promise<boolean>;
17
- static openProject(projectInfo: ProjectInfo, batchmode?: boolean, waitForExit?: boolean): Promise<boolean>;
17
+ static openProject(projectInfo: ProjectInfo, useHub?: boolean, batchmode?: boolean, waitForExit?: boolean): Promise<boolean>;
18
18
  }
19
19
  export default UnityEditor;
@@ -234,7 +234,7 @@ class UnityEditor {
234
234
  return false;
235
235
  }
236
236
  }
237
- static async openProject(projectInfo, batchmode = false, waitForExit = true) {
237
+ static async openProject(projectInfo, useHub = true, batchmode = false, waitForExit = true) {
238
238
  try {
239
239
  console.debug(`Opening project at ${projectInfo.projectPath}`);
240
240
  const args = ["-projectPath", projectInfo.projectPath];
@@ -244,6 +244,9 @@ class UnityEditor {
244
244
  if (batchmode) {
245
245
  args.push("-batchmode");
246
246
  }
247
+ if (useHub) {
248
+ args.push(...["-useHub", "-hubIPC"]);
249
+ }
247
250
  const editorInfo = { version: projectInfo.editorVersion };
248
251
  const options = { reject: false };
249
252
  const { stdout, stderr } = await this.execUnityEditorCommand(editorInfo, args, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notask/unity-cli-tools",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/esm/index.d.ts",