Search Unity

Unity New Config Environment Variables

Discussion in 'Unity Accelerator' started by ryanc-unity, Jun 3, 2020.

  1. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,758
    With the release of v1.0.436+g25805e4, Unity Accelerator offers new environment variables for configuring common features, if desired. These are in addition to the command line options and the actual saved settings in the configuration file. Note that the order of precedence is: command line option, environment variable, configuration file setting, built-in default value.

    UNITY_ACCELERATOR_DEBUG

    Can be set to "true" or "false", which are equivalent to --debug and --no-debug and reflected in the configuration file as the "Debug" setting of true and false. When true, extra log lines are generated describing activity in more detail.

    UNITY_ACCELERATOR_LOG_STDOUT

    Can be set to "true" or "false", which are equivalent to --log-stdout and --no-log-stdout but there is no corresponding configuration file setting. This routes all log lines to standard output instead of to local log files.

    UNITY_ACCELERATOR_LOG_STDOUT_ALSO

    Can be set to "true" or "false", which are equivalent to --log-stdout-also and --no-log-stdout-also but there is no corresponding configuration file setting. This acts similarly to --log-stdout in that all log lines will be routed to standard output, but the log lines will also go to the local log files. If set true, this will take precedence over --log-stdout.

    UNITY_ACCELERATOR_PERSIST

    Can be set to the path where the configuration file can be found, log files are written, metrics are persisted, etc. It is also where the CacheDir setting will default to. This is equivalent to --persist <path> but there is no corresponding configuration file setting, as this value indicates where the configuration file can be found. Remember that --persist <path> will be used first if it exists, then UNITY_ACCELERATOR_PERSIST if it is set, then the fallback of ".", the current working directory will be used.

    UNITY_ACCELERATOR_AUTO_UPDATES

    Can be set to "true" or "false", which are equivalent to --auto-updates and --no-auto-updates and reflected in the configuration file as the "NoAutoUpdates" setting. When auto updates are enabled, which is the default, the accelerator will automatically download and upgrade itself as new releases are made available. When disabled, a newly available update will simply generate a log line but not downloaded or executed.

    UNITY_ACCELERATOR_HTTP_PORT

    Can be set to the port desired for the HTTP service, equivalent to --http-port <port> and reflected in the configuration file as the "HTTPPort" setting. The HTTP service is used for the built-in dashboard, metrics, health check, and when Unity Teams Collaborate caching is enabled.

    UNITY_ACCELERATOR_PROTOBUF_PORT

    Can be set to the port desired for the "Protobuf" service, equivalent to --protobuf-port <port> and reflected in the configuration file as the "ProtobufPort" setting. The Protobuf service is also known as the Asset Pipeline Version 2 service and is what provides imported asset caching in the Unity Editor.

    There are a few more variables for client testing tools, contained under the "unity-accelerator tool" subcommands. These are experimental, early access commands and are subject to change in the future. If you have feedback on other settings to expose via environment variables, please reach out to us.
     
unityunity