Disable Unity CLI data collection
Disable usage analytics, the anonymous usage count, crash reports, and automatic update checks in the Unity command-line interface (CLI).
阅读时间2 分钟最后更新于 12 小时前
Use one command and three environment variables to stop all telemetry and background checks in the Unity CLI. You can disable each data type independently, or disable all of them on every developer machine and continuous integration (CI) runner. To learn what each data type contains before you disable it, refer to Unity CLI telemetry data.
Manage usage analytics
To enable or disable usage analytics, or to check its status:
-
Open a terminal.
-
Run one of the following commands:
- To enable usage analytics, run .
unity analytics opt-in - To disable usage analytics, run .
unity analytics opt-out - To check whether usage analytics is enabled, run .
unity analytics status
- To enable usage analytics, run
When you opt out, the CLI stops sending usage analytics immediately. You can change this setting at any time.
Settings for each data type
The following table lists the command or environment variable that disables each data type.
To stop | Use |
|---|---|
| Usage analytics | |
| Anonymous usage count | |
| Crash reports | |
Disable all data collection on a machine or CI runner
To disable all telemetry on a developer machine or CI runner:
-
Open a terminal.
-
Set the following environment variables:export UNITY_NO_CLI_INVOKED_TELEMETRY=1export UNITY_NO_CRASH_REPORT=1export UNITY_NO_UPDATE_CHECK=1
-
Run.
unity analytics opt-out -
To confirm that usage analytics is off, run.
unity analytics status
Repeat these steps on every developer machine and CI runner.