Skip to content

Commit 9345e07

Browse files
update README.md
1 parent a872824 commit 9345e07

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ With options always using double dashes (`--option`) and arguments passed direct
6060
- `unity-cli --help` for a full list of commands and options.
6161
- `unity-cli [command] --help` for details on a specific command.
6262
- `unity-cli [command] --json` to get the output in JSON format (if supported).
63-
- `unity-cli [command] --verbose` to enable verbose logging for debugging.
63+
- `unity-cli [command] --verbose <args...>` to enable verbose logging for debugging.
64+
65+
> [!IMPORTANT]
66+
> `<args...>` must always be the last parameters passed to the command when using any command options.
6467
6568
```bash
6669
unity-cli --help
@@ -124,8 +127,8 @@ unity-cli hub-path
124127

125128
`hub-install [options]`: Install or update the Unity Hub
126129

127-
- `--auto-update`: Automatically updates the Unity Hub if it is already installed. Cannot be used with --hub-version.
128-
- `--hub-version`: Specify to install a specific version of Unity Hub. Cannot be used with --auto-update.
130+
- `--auto-update`: Automatically updates the Unity Hub if it is already installed. Cannot be used with `--hub-version`.
131+
- `--hub-version`: Specify to install a specific version of Unity Hub. Cannot be used with `--auto-update`.
129132
- `--verbose`: Enable verbose output.
130133
- `--json`: Output installation information in JSON format.
131134

@@ -137,13 +140,13 @@ unity-cli hub-install
137140

138141
`hub [options] <args...>`: Run Unity Hub command line arguments (passes args directly to the hub executable).
139142

140-
- `<args...>`: Arguments to pass directly to the Unity Hub executable.
141143
- `--verbose`: Enable verbose output.
144+
- `<args...>`: Arguments to pass directly to the Unity Hub executable.
142145

143146
Lists available Unity Hub commands:
144147

145148
```bash
146-
unity-cli hub help
149+
unity-cli --verbose hub help
147150
```
148151

149152
Gets a list of installed editors:
@@ -162,8 +165,8 @@ unity-cli hub editors --installed
162165
- `-u`, `--unity-version <unityVersion>` The Unity version to get (e.g. `2020.3.1f1`, `2021.x`, `2022.1.*`, `6000`). If specified, it will override the version read from the project.
163166
- `-c`, `--changeset <changeset>` The Unity changeset to get (e.g. `1234567890ab`).
164167
- `-a`, `--arch <arch>` The Unity architecture to get (e.g. `x86_64`, `arm64`). Defaults to the architecture of the current process.
165-
- `-b`, `--build-targets <buildTargets>` The Unity build target to get (e.g. `iOS,Android`).
166-
- `-m`, `--modules <modules>` The Unity module to get (e.g. ios, android).
168+
- `-b`, `--build-targets <buildTargets>` The Unity build target to get/install as comma-separated values (e.g. `iOS,Android`).
169+
- `-m`, `--modules <modules>` The Unity module to get/install as comma-separated values (e.g. `ios,android`).
167170
- `-i`, `--install-path <installPath>` The path to install the Unity Editor to. By default, it will be installed to the default Unity Hub location.
168171
- `--verbose` Enable verbose logging.
169172
- `--json` Prints the last line of output as JSON string.
@@ -236,10 +239,10 @@ unity-cli create-project --name "MyGame" --template com.unity.template.3d(-cross
236239
- `-t`, `--build-target <buildTarget>` The Unity build target to switch the project to (e.g. `StandaloneWindows64`, `StandaloneOSX`, `iOS`, `Android`, etc).
237240
- `--verbose` Enable verbose logging.
238241

239-
Opens a specific Unity project with the latest Unity 6 version:
242+
Opens a specific Unity project with the latest Unity 6 version and switches the active platform to Android:
240243

241244
```bash
242-
unity-cli open-project --unity-project <path-to-project> --unity-version 6000
245+
unity-cli open-project --unity-project <path-to-project> --unity-version 6000 --build-target Android
243246
```
244247

245248
> [!TIP]
@@ -256,8 +259,8 @@ unity-cli open-project
256259
- `--unity-editor <unityEditor>` The path to the Unity Editor executable. If unspecified, `--unity-project` or the `UNITY_EDITOR_PATH` environment variable must be set.
257260
- `--unity-project <unityProject>` The path to a Unity project. If unspecified, the `UNITY_PROJECT_PATH` environment variable will be used, otherwise no project will be specified.
258261
- `--log-name <logName>` The name of the log file.
259-
- `<args...>` Arguments to pass directly to the Unity Editor executable.
260262
- `--verbose` Enable verbose logging.
263+
- `<args...>` Arguments to pass directly to the Unity Editor executable.
261264

262265
```bash
263266
unity-cli run --unity-project <path-to-project> -quit -batchmode -executeMethod StartCommandLineBuild

0 commit comments

Comments
 (0)