文档

Unity command-line interface (CLI)

Download Unity Hub

Unity command-line interface (CLI)

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 小时前

注意
This page applies to Unity CLI 1.0.0-beta.17 and later.
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:
  1. Open a terminal.
  2. 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
      .
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
unity analytics opt-out
Anonymous usage count
UNITY_NO_CLI_INVOKED_TELEMETRY=1
Crash reports
UNITY_NO_CRASH_REPORT=1

Disable all data collection on a machine or CI runner

To disable all telemetry on a developer machine or CI runner:
  1. Open a terminal.
  2. Set the following environment variables:
    export UNITY_NO_CLI_INVOKED_TELEMETRY=1export UNITY_NO_CRASH_REPORT=1export UNITY_NO_UPDATE_CHECK=1
  3. Run
    unity analytics opt-out
    .
  4. To confirm that usage analytics is off, run
    unity analytics status
    .
Repeat these steps on every developer machine and CI runner.
注意
On Windows, set the same variables as user or system environment variables.

Additional resources