Skip to content

Commit bb23032

Browse files
unity-cli@v1.0.9 (#10)
- fix macOS unity editor install hang
1 parent b1f2ef5 commit bb23032

6 files changed

Lines changed: 24 additions & 16 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ unity-cli activate-license --email <your-email> --password <your-password> --ser
5454

5555
#### Create a New Project from a Template
5656

57+
> [!NOTE] Regex patterns are supported for the `--template` option. For example, to create a 3D project with either the standard or cross-platform template, you can use `com.unity.template.3d(-cross-platform)?`.
58+
5759
```bash
58-
unity-cli create-project --name "MyGame" --template com.unity.template.3d --unity-editor <path-to-editor>
60+
unity-cli create-project --name "MyGame" --template com.unity.template.3d(-cross-platform)? --unity-editor <path-to-editor>
5961
```
6062

6163
#### Build a Project

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rage-against-the-pixel/unity-cli",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "A command line utility for the Unity Game Engine.",
55
"author": "RageAgainstThePixel",
66
"license": "MIT",

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// export public API
2+
export * from './android-sdk';
23
export * from './license-client';
3-
export * from './utilities';
4-
export * from './unity-hub';
54
export * from './logging';
6-
export * from './unity-version';
7-
export * from './unity-project';
8-
export * from './android-sdk';
95
export * from './unity-editor';
6+
export * from './unity-hub';
7+
export * from './unity-project';
8+
export * from './unity-version';
9+
export * from './utilities';

src/unity-hub.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import * as path from 'path';
44
import * as yaml from 'yaml';
55
import { spawn } from 'child_process';
66
import { Logger, LogLevel } from './logging';
7+
import { UnityEditor } from './unity-editor';
8+
import { UnityVersion } from './unity-version';
79
import {
810
SemVer,
911
coerce,
@@ -18,10 +20,11 @@ import {
1820
ReadFileContents,
1921
GetTempDir
2022
} from './utilities';
21-
import { UnityVersion } from './unity-version';
22-
import { GetUnityReleasesData, UnityRelease } from '@rage-against-the-pixel/unity-releases-api/dist/unity-releases-api/types.gen';
23-
import { UnityReleasesClient } from '@rage-against-the-pixel/unity-releases-api/dist/client';
24-
import { UnityEditor } from './unity-editor';
23+
import {
24+
UnityReleasesClient,
25+
GetUnityReleasesData,
26+
UnityRelease
27+
} from '@rage-against-the-pixel/unity-releases-api';
2528

2629
export class UnityHub {
2730
/** The path to the Unity Hub executable. */
@@ -119,8 +122,11 @@ export class UnityHub {
119122
process.stdout.write(`${outputLine}\n`);
120123
}
121124

122-
if (output.includes(tasksComplete)) {
123-
child.kill('SIGTERM');
125+
if (outputLine.includes(tasksComplete)) {
126+
if (child?.pid) {
127+
Logger.instance.warn(`Unity Hub reported all tasks completed, terminating process...`);
128+
process.kill(child.pid, 0);
129+
}
124130
}
125131
} catch (error: any) {
126132
if (error.code !== 'EPIPE') {

src/unity-project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os from 'os';
22
import fs from 'fs';
33
import path from 'path';
4-
import { ResolveGlobToPath } from './utilities';
54
import { UnityVersion } from './unity-version';
5+
import { ResolveGlobToPath } from './utilities';
66

77
export class UnityProject {
88
/** The default modules to include in a new Unity project. */

0 commit comments

Comments
 (0)