Version: 2020.2
将项目移动到另一个版本控制系统
Collaborate troubleshooting tips

Unity Accelerator

概述

The Unity Accelerator is a caching proxy agent that keeps copies of a team’s imported assets to speed up teamwork. The goal of the accelerator is to help teams reduce iteration time. An Accelerator coordinates asset sharing when your team is working on the same local network so that you don’t need to reimport portions of your project. This is done via the Asset Import Pipeline v2 Unity Editor capabilities. Optionally, Accelerator can also be used with Unity Teams Advanced to share Collaborate source assets, which significantly reduces download time from the Collaborate service.

When you install an Accelerator on your local network, the Unity Editor (version 2019.3 or higher; see Unity Editor requirements below) communicates with it to store and retrieve assets that other team members need, have changed, or built. The Accelerator keeps temporary copies of these assets to avoid wasting time and bandwidth retrieving or reimporting them.

Accelerator overview
Accelerator overview

内容

Installing an Accelerator

要求

本地托管要求

请在您团队经常使用的每个网络上都安装 Accelerator。您必须有计算机在本地网络上运行并且可以托管 Accelerator。选择主机时,应考虑以下要求:

  • 本地主机必须运行以下操作系统之一:
    • Linux(Ubuntu 16.04、Ubuntu 18.04 或 CentOS 7)
      对于 Linux,必须以 root 用户身份安装 Accelerator。
    • Windows Server 2008R2 / Windows 7 或更高版本(64 位)
    • Mac OS X 10.12 或更高版本(64 位)
  • The local host must have sufficient local storage space to host most of your project’s files, preferably on a solid-state drive separate from the drive that hosts your operating system.
  • The local host should have as much memory as is reasonably affordable. The minimum should be 2GB of RAM, but if more memory is available it will be used by the operating system to buffer cached items, resulting in higher performance for commonly accessed items. Usual recommendation is 32GB of RAM.
  • 本地主机必须与您的团队连接到同一网络,或者必须采用允许访问 Accelerator IP 地址和端口 (TCP) 的相应防火墙策略在本地进行路由。
  • Anyone with access to the host machine has access to your project’s files, regardless of permission structures within your Unity Organization. As such, Unity recommends restricting that machine so that only an Organization Owner or Manager can access and interact with the Accelerator.

Unity Editor 要求

Your Unity project must use version 2019.3 or higher of the Unity Engine.

Installing an Accelerator via the Installer

如果您没有 Unity Teams Advanced,可以直接下载并安装 Unity Accelerator,并在安装过程中取消选中注册令牌:

注意:如果将 Accelerator 安装在 Linux 系统上,请参阅验证 Accelerator 版本

You can also install the accelerator via Docker Hub.

在“无头”计算机中安装 Accelerator

在每个平台上,可以从命令行运行安装程序。如果使用参数 --help 来执行安装程序,它将显示各种可用选项。要在没有任何提示的情况下运行完整安装,您应该为以下项提供值:

  • --storagedir 设置 Accelerator 的目录以存储文件和配置。
  • --registration-token 指定创建 Accelerator 后在开发者控制面板中提供的令牌。这是将 Accelerator 与 Collaborate 配合使用的必需条件。
  • Use --mode unattended for automated installations that should not query anything. This uses default values, or values from other option flags provided.
  • On Mac OS X, you need to mount the disk image (DMG) and run the binary located in the installer app’s directory (located at Contents/MacOS/installbuilder.sh).

配置 Editor 以使用 Accelerator

安装 Accelerator 时,安装向导的最后一步按以下格式显示 Editor 中引用的 IP 地址和端口:

[IP]:[Port]

要配置您的 Editor 来将该 Accelerator 用作资源管线版本 2 缓存服务器,请遵循以下步骤进行操作:

  1. In the Unity Editor, select Edit > Project Settings… (Windows) or Unity > Project Settings… (OSX).
  2. Select Editor from the left menu.
  3. Under the Cache Server section, set Mode to Enabled.
  4. Fill in the IP address with Accelerator’s IP address from the setup wizard.
  5. Press the Check Connection button to test connectivity.
Project settings
Project settings

You can optionally choose a different namespace prefix from the default, in case you wish to ensure isolation from other projects. You can also individually disable uploading or downloading as needed. For example, you might want a build system to only have uploading enabled, and developers’ editors only have download enabled. Note the TLS/SSL option is only a feature in editor versions from 2020.1 onward and the accelerator must be configured for TLS as well.

In the main editor view, you can check the accelerator connectivity by looking at the status bar on the lower right (only in editor versions from 2020.1 onward):

Project connectivity
Project connectivity

If you’d like, you can configure the accelerator to use via the Global settings, which will be used by default for all projects unless overridden by the project settings. To configure the global settings, select the Edit > Preferences… menu item:

Project connectivity
Project connectivity

Installing an Accelerator via Docker Hub

A container is provided on Docker Hub at https://hub.docker.com/repository/docker/unitytechnologies/accelerator.

First Time Setup

Unity recommends that you use a persistent storage area for hosting the Accelerator configuration and cache. To set this up for the first time, you will want to use one or more of the following variables when running the container for the first time (some examples will be below). The variables are only used if the startup does not find a configuration file so it’s safe to run with them set on successive runs.

Variable Usage
COLLAB_REGISTRATION_TOKEN Accelerate Unity Collaborate
DISABLE_USAGE_STATS Set to true to disable usage stats – leaving usage stats enabled can help improve the Accelerator’s features and performance by giving Unity valuable feedback.
USER The user name for the local, built-in dashboard.
PASSWORD The password for the local, built-in dashboard.
CERT_HOSTNAME The hostname to use for TLS support. This is used for redirects, etc. and goes along with CERT_PEM and KEY_PEM below.
CERT_PEM The path to a cert.pem to use for TLS support. If you set CERT_HOSTNAME but do not set CERT_PEM, <persist_dir>/cert.pem will be assumed.
KEY_PEM The path to a key.pem to use for TLS support. If you set CERT_HOSTNAME but do not set KEY_PEM, <persist_dir>/key.pem will be assumed.

For example, to start up and register for use with the Collaborate service, you might run something like this:

$ docker run --rm -ti -v "${PWD}/agent:/agent" -e 'COLLAB_REGISTRATION_TOKEN=ft0bJvbRD' unitytechnologies/accelerator:latest

To override TLS settings, continuing with the above example, ensure you have your cert.pem and key.pem in the /agent path specified and then include a CERT_HOSTNAME like this:

$ docker run --rm -ti -v "${PWD}/agent:/agent" -e 'CERT_HOSTNAME=myhostname.com' -e 'COLLAB_REGISTRATION_TOKEN=ft0bJvbRD' unitytechnologies/accelerator:latest

Subsequent Execution

You can also set any environment variables the accelerator would normally recognize. See unity-accelerator --all-help and look for options that indicate Default: $SOME_VARIABLE. There are two that the container will set if you do not:

variable usage
UNITY_ACCELERATOR_PERSIST Container default is /agent. This is the directory where unity-accelerator.cfg resides as well as other persisted data (cachedir possibly being different).
UNITY_ACCELERATOR_LOG_STDOUT Container default is true. This, if true, will output logs to stdout only; false if you want actual log files written within the persist directory.

Running the container

We sign our docker images so we strongly recommend you enable Docker Content Trust:

$ export DOCKER_CONTENT_TRUST=1

Normally, you should be able to run the Accelerator like the following:

$ docker run -p 80:80 -p 443:443 -p 10080:10080 -v "${PWD}/agent:/agent" unitytechnologies/accelerator:latest

However, If you would like to choose a different location for where the Accelerator will store the configuration and cached artifacts, you might choose to provide additional environment variable configuration values like this:

$ docker run -p 80:80 -p 443:443 -p 10080:10080 -v "${PWD}/agent:/mnt/another_spot" -e "UNITY_ACCELERATOR_PERSIST=/mnt/another_spot" -e "UNITY_ACCELERATOR_DEBUG=true" unitytechnologies/accelerator:latest

To set username and password for local dashboard, you can use USER and PASSWORD environment variables:

$ docker run -p 80:80 --env PASSWORD=[PASSWORD] --env USER=[USERNAME] unitytechnologies/accelerator:latest

Exposed Ports

The following are the default values for ports used by Unity Accelerator: 80, 443, 10080, 10443.

Accelerator 与 Unity Teams Advanced

Accelerator 与 Unity Teams Advanced 配合使用可带来更多益处:

  • Collaborate integration to ensure recently added or modified source assets are delivered on the local network, dramatically reducing download times.
  • 开发者控制面板中进行远程监测(请参阅监测 Accelerator)。
  • Secure transport and access control of source assets shared between Unity Editors and the Accelerator (see source asset security).
在常规的 Collaborate 工作流程中,用户可以向云端上传和从云端下载。凭借加速的 Collaborate 工作流程,上传内容将保存到云端和 Accelerator,但是用户可以直接从 Accelerator 下载。
在常规的 Collaborate 工作流程中,用户可以向云端上传和从云端下载。凭借加速的 Collaborate 工作流程,上传内容将保存到云端和 Accelerator,但是用户可以直接从 Accelerator 下载。

设置

如果您拥有 Unity Teams Advanced,则您组织的某个所有者或管理员可以按照以下步骤从开发者控制面板中创建 Accelerator:

  1. From the Develop tab of the dashboard, select the project you want to create an Accelerator for.
  2. In the project view, select Collaborate > Accelerator from the left navigation bar. 3.单击 New Accelerator 按钮。
  3. In the New Accelerator prompt, enter an agent name for Unity to use to identify the Accelerator agent. You can also optionally specify a port number.
    New Accelerator window
    Note: The current limit is three Accelerators per Organization.

  4. Click Save to confirm your settings.
  5. On the following screen, copy the registration token, then click the Download Accelerator button in the top-right corner, and select the appropriate operating system.

    Download Accelerator from the developer dashboard.
    You can also install the accelerator via Docker Hub.
  6. Launch the downloaded installer, and follow the installation wizard. Use the registration token you copied to register the Accelerator with Unity Collaborate. This will allow you to use the Accelerator for enhanced Collaborate performance.

注意:如果将 Accelerator 安装在 Linux 系统上,请参阅验证 Accelerator 版本

Source asset security

When used with Unity Teams Advanced, each Accelerator receives its own security certificate to prove it has permission to access your Organization. Before an Accelerator uploads or downloads any content, the Unity Editor making the request uses SSL/TLS to securely connect to the Accelerator and verifies its authenticity. When Unity Editors discover and connect to an Accelerator, instead of passing a normal Unity user token, they receive a special token from the Unity Identity service. These tokens verify the user’s identity and access to a single project within your Organization, thereby protecting access to any other Organizations and projects while using an Accelerator.

或者,在启动 Unity Editor 时,您可以使用命令行参数来提供 Accelerator 缓存服务器配置详细信息。

要指定希望使用 Accelerator 缓存服务器,请使用 -EnableCacheServer 参数,而要指定地址和端口号,请使用 -cacheServerEndpoint Address:Port,并将 Address 和 Port 替换为缓存服务器的相应详细信息。

注意:Accelerator 缓存服务器要求您的项目使用资源数据库 V2 (ADB2)。从命令行启动 Unity 时,可以使用 -adb2 参数来强制升级到 ADB2。

请参阅命令行参数以了解更多信息。

监测 Accelerator

Local administrator dashboard

The Accelerator has a built-in dashboard for quick monitoring and configuration changes.

Accelerator configuration
Accelerator configuration

See the Command Line Tools section for information on how to find out what your dashboard URL is; though if you know the ip and port of the accelerator you can just use http://ip:port/dashboard and the accelerator will handle any needed redirects. For full metrics monitoring see Accessing Accelerator metrics directly and the full configuration of the Accelerator is available through its unity-accelerator.cfg file.

开发者控制面板(仅限 Unity Teams Advanced 用户)

If you are a Unity Teams Advanced user, you can monitor Accelerator metrics from the developer dashboard. These metrics only apply to source assets, and do not apply to generated (imported) assets.

To view a summary of your project’s Accelerators, select that project, then select Collaborate > Accelerators from the left navigation bar. In this menu, you can view the following information:

属性 描述
名称 创建 Accelerator 时提供的名称。
Avg.Efficiency 过去 24 小时内,Accelerator 的平均效率
Editors 连接到 Accelerator 的 Unity Editor 数量。
Latest Activity Accelerator 的最近使用情况。
Status Accelerator 可能处于以下状态之一:

- Available 表示未安装 Accelerator 或未向 Collaborate 服务注册 Accelerator。
- Ready 表示 Accelerator 已向 Collaborate 服务注册,但未连接 Unity Editor。
- In use 表示已连接 Unity Editor,或 Unity Editor 最近已连接到 Accelerator。
- Idle 表示 Unity Editor 以前使用过 Accelerator,但是最近没有活动。
- Not Listening 表示 Accelerator 无法连接到已配置的端口(很可能是因为其他服务已在使用该端口)。
- Disconnected 表示 Accelerator 不再连接到相应服务来报告使用情况,也不再接收配置更改。
Enabled 指示 Unity Editor 是否可以发现并尝试使用 Accelerator。不管已禁用的 Accelerator 是否正在运行,Unity Editor 都不会使用这些 Accelerator。

单击 Accelerator 的 Details 可查看有关其使用情况的以下深入信息。这些数据每 10 分钟更新一次。

效率 (Efficiency)

此处显示 Accelerator 在过去 24 小时内的平均性能。值的范围是 0 到 100,用于衡量从 Accelerator 本地(而不是从 Collaborate 服务远程)提供的内容下载所占的百分比。值为 0 表示 Accelerator 无助于内容下载。值为 100 表示 Accelerator 提供了所有内容下载。

已移除的字节数 (Bytes Removed)

Periodically, the Accelerator clears space to store new assets. When it does, the dashboard reports the number of bytes allocated to older assets that the Accelerator removed from local storage.

Note: This is a normal operation to help maintain a healthy Accelerator. However, if this value seems to be adversely affecting the Accelerator’s efficiency, you might need to add more storage space to accommodate your team’s usage. Ideally, the file system running the Accelerator should use a solid-state hard drive with enough free disk space to house all files in the most recent version of active projects, but this is not a requirement. If insufficient storage is available, the overall efficiency of the Accelerator declines.

传输的字节数 (Bytes Delivered)

分布式团队可能有使用 Accelerator 的本地参与者,也有使用 Collaborate 服务的远程参与者。在这些情况下,Accelerator 会监听远程发布事件,并主动为其本地网络上的用户下载受影响的内容。

Accelerator 在使用过程中会报告从远程 Collaborate 服务请求和下载的字节总数,而不是从本地网络传输的字节总数。在本地传输更多字节会更有利于您的团队,因为这样可以减轻网络网关的负担。

节省的时间 (Time Saved)

The Accelerator tracks bandwidth when it delivers locally stored assets instead of downloading them from the Collaborate service, and reports the difference in time the Unity Editor would have waited to download assets remotely as time saved.

Note: The aforementioned metrics apply only to source assets. They do not apply to generated (imported) assets.

直接访问 Accelerator 指标

如果您没有使用 Unity Teams Advanced,每个 Accelerator 将以 /metrics 的形式托管 Prometheus 指标报告,您可以从本地网络查询此数据。以下是您可以访问的指标的完整列表:

指标 描述
process_resident_memory_bytes Accelerator 使用的内存量。
uta_agent_sys_cpu_percent 系统使用的 CPU 量。
uta_agent_sys_mem_bytes_used 系统使用的内存量。
uta_agent_protobuf_connects Unity Editor 连接到资源导入管线的服务的次数。
uta_agent_protobuf_bytes_in 从资源导入管线接收到的字节数。
uta_agent_protobuf_bytes_out 发送到资源导入管线的字节数。
uta_agent_protobuf_requests{code="0",method="get"} 发送到资源导入管线的项数。
uta_agent_protobuf_requests{code="1",method="get"} 发送到资源导入管线的项中发生的错误数。
uta_agent_protobuf_requests{code="2",method="get"} 发送到资源导入管线的项中发生的命名空间错误数。
uta_agent_protobuf_requests{code="3",method="get"} 资源导入管线针对尚未缓存的项提出的请求数。
uta_agent_protobuf_requests{code="0",method="put"} 从资源导入管线接收到的项数。
uta_agent_protobuf_requests{code="1",method="put"} 从资源导入管线接收的项中发生的错误数。
uta_agent_protobuf_requests{code="2",method="put"} 从资源导入管线接收的项中发生的命名空间错误数。
uta_agent_protobuf_requests{code="0",method="delete"} 从资源导入管线提出的关于删除项的请求数。
uta_agent_protobuf_requests{code="1",method="delete"} 资源导入管线删除项时发生的错误数。
uta_agent_protobuf_requests{code="2",method="delete"} 资源导入管线提出的删除项请求中发生的命名空间错误数。
uta_agent_protobuf_requests{code="3",method="delete"} 资源导入管线针对尚未缓存的项提出的删除项请求数。
uta_agent_cache_bytes_evicted_unscheduled Number of bytes evicted from cache during an “unscheduled” pass. Unscheduled evictions occur when running out of disk space while processing a request. Normally, scheduled background evictions should keep up with demand, so an increase in this metric’s value indicates an overwhelmed server. Increasing the configuration’s CacheMinFreeBytes or CacheMinFreePercent may help to give more of a free space buffer, or you may need to upgrade the underlying hardware or install an additional accelerator.
uta_agent_cache_files_evicted_unscheduled Similar to the above uta_agent_cache_bytes_evicted_unscheduled metrics, but counts files evicted instead of byte count. This might be an easier metric to alert on. For example: Alert when files metric increases by more than 1 per second.
uta_agent_protobuf_cache_hits 从缓存满足的资源导入管线请求数。
uta_agent_protobuf_cache_misses 无法从缓存满足的资源导入管线请求数。
uta_agent_protobuf_cache_bytes_out 从缓存提供给资源导入管线的字节数。
uta_agent_protobuf_cache_bytes_in 从资源导入管线接收而存储到缓存中的字节数。

Unity Editor 日志调试

Unity Editor 日志可用于查看调试信息。要查看 Collaborate 事件的日志,请在环境变量设置为 enableCollabEventLogs=true 的情况下运行 Unity Editor(或 Unity Hub)。具有 [collab-accelerator] 标记的日志会有助于深入了解 Accelerator 的性能。

以下代码块显示了使用资源导入管线 v2 的 Accelerator 的日志输出示例。这无需 enableCollabEventLogs=true,因为它不用于 Collaborate。

2019-10-07T11:34:51-0700 Using Asset Import Pipeline V2.
  ...
  2019-08-08T09:04:03-0700 Start importing Assets/Scenes/tame-the-unicorn.png guid(07a0d449dcaef4d2ba104e9d9b350de6)
  2019-08-08T09:04:05-0700 Done importing asset: 'Assets/Scenes/tame-the-unicorn.png' (target hash: 'd5fddd470dd9beedcd7261b6455e436a') in 1.082988 seconds
  2019-08-08T09:04:05-0700 RemoteAssetCache::AddArtifactToCacheServer - artifactKey='Guid(07a0d449dcaef4d2ba104e9d9b350de6) Importer(-1,)' Target hash='d5fddd470dd9beedcd7261b6455e436a'

Querying for cacheable assets in Cache Server:
    86ac778e1a44c9143864797ddacf8cc9:Assets/New Material.mat
RemoteAssetCache - Download - Metadata - success:true, namespace:81e94844d19a16919208533e08183531, key:8d71d5006046bb9d5e4a7172eec3f3b2
RemoteAssetCache - Download - Artifact - success:true, namespace:78b2fdc254b0a4f8a4693a81bb96598a, key:de1eef03efd25a722d1500658bf19038 for asset:'Assets/New Material.mat', time elapsed: 0.005171 seconds
RemoteAssetCache - Download - Artifact - success:true, namespace:78b2fdc254b0a4f8a4693a81bb96598a, key:b19c9d64967a9691abecdb66364ae392 for extension:'Assets/New Material.mat.info', time elapsed: 0.004721 seconds

停止并重新启动 Accelerator 服务

Accelerator 作为每个平台的后台进程运行。

Windows

在“设置”菜单中搜索“服务”一词或者在运行对话框 (WIN + R) 中运行“services.msc”来打开服务面板。下一步,在生成的列表中找到“Unity Accelerator”服务。左面板中会显示停止服务重新启动服务选项。

Mac OS X

在终端中运行 launchctl 命令以便从 LaunchControl 实用程序控制“com.unity.accelerator”服务。有关更多信息,请访问 https://www.launchd.info/

Linux

使用 service 控制台实用程序来控制“unity-accelerator”服务。有关更多信息,请访问 http://manpages.ubuntu.com/manpages/bionic/man8/service.8.html

维护

Accelerator 服务会在维护期间自动自我更新。当前,该维护期根据运行 Accelerator 的计算机而设置为当地时间凌晨 01:00–02:00。仅当 Accelerator 发现可用的更新版本时,才会进行自我更新。

Accelerator’s installation and uninstallation logs are saved in the operating system’s standard temp directory as unity-accelerator-*install.log. Accelerator’s logs are saved in the storage directory as unity-accelerator.log.

Command line tools

The Accelerator has a large set of command line tools you can use to troubleshoot, configure, and just generally make use of one or more accelerators. For ease of use, it’s best to add the location of the unity-accelerator executable to your PATH. The executable was installed in the path you chose when running the installer, C:\Program Files\Unity\accelerator for example.

The CLI tool has an extensive help system; you can run unity-accelerator with no arguments to get started:

$ unity-accelerator
Unity Accelerator v1.0.524+g96c5e18

Run on a local network to speed up transactions with Unity Services.

.....

You can also run unity-accelerator --all-help to output all the help text for all commands in one go. It’s probably best to pipe the output through less or redirect output to a text file to read.

When working on a specific accelerator, to reconfigure it for example, it’s best to change your working directory to the same as where the unity-accelerator.cfg file is. You can also set the UNITY_ACCELERATOR_PERSIST environment variable to that directory, or you can try to remember to always use the --persist <dir> option, but most find changing the working directory easiest.

One rather common set of cli tools used are the dashboard tools:

$ unity-accelerator dashboard password newaccount
Password: ****
   Again: ****
$ unity-accelerator dashboard list
admin
newaccount
$ unity-accelerator dashboard url
http://172.18.37.249:8080/dashboard/

That final tool, dashboard url, is useful to find out what url to put in your browser to visit the built-in dashboard.

Mirroring multiple accelerators

You can configure multiple accelerators to mirror the same cached data if desired. You might want to have two mirrored accelerators running on the same network for high availability – if one crashes, has a hardware failure, or needs maintenance for whatever reason, the other accelerator can compensate. You might also mirror cache servers that are remote from each other, for example a main office might mirror its data to a branch office, providing copies of its cached data for use at the branch office as well.

For now, the mirroring features only provide outgoing data capabilities, also known as “push” or “forwarding”. You can push/forward to multiple accelerators, or even chain them: A sending to B, with B sending to C, and even C sending back to A. You do not need to worry about circular chains; items are time stamped so a receiving accelerator will ignore any incoming items that aren’t newer than what it already has.

Let’s walk through an example where accelerator A has an ip:port of 1.1.1.1:1111 and accelerator B is 2.2.2.2:2222. Let’s say both have no data to start with, so let’s put an item into A and note that it is not in B.

$ echo test1 | unity-accelerator cache put 1.1.1.1:1111 namespace1 key1
$ unity-accelerator cache get 1.1.1.1:1111 namespace1 key1
test1
$ unity-accelerator cache get 2.2.2.2:2222 namespace1 key1
key not found

Now let’s configure A to forward to B. We do this by altering A’s configuration, so log into the machine running accelerator A, shut down the accelerator and:

# Shutdown Accelerator A
$ cd <directory where unity-accelerator.cfg is>
$ unity-accelerator config set ProtobufForwardPuts protobuf:2.2.2.2:2222
# Start Accelerator A back up

We should now be able to put another item into A’s cache and see it forwarded to B.

$ echo test2 | unity-accelerator cache put 1.1.1.1:1111 namespace2 key2
$ unity-accelerator cache get 1.1.1.1:1111 namespace2 key2
test2
$ unity-accelerator cache get 2.2.2.2:2222 namespace2 key2
key not found
# It will take up to a minute before the forwarding occurs, due to how the algorithm works with batching, etc. But within a minute or two you should see...
$ unity-accelerator cache get 2.2.2.2:2222 namespace2 key2
test2

However, this only covers new data (any new items put into accelerator A will be forwarded to accelerator B) but doesn’t cover any existing data. In our example, the first item still is not in accelerator B.

$ unity-accelerator cache get 2.2.2.2:2222 namespace1 key1
key not found

To cover this case, and in cases where you just want to forward all data one time (could be useful when switching from one accelerator to a new one) you can use the “push” command line tool:

$ unity-accelerator cache push 1.1.1.1:1111 2.2.2.2:2222
{"msg":"push completed", "destination":"2.2.2.2:2222", "namespaces":2, "keys":2, "bytes":12, "supercededs":1, "errors":0, "elapsed":"44.054078ms"}
$ unity-accelerator cache get 2.2.2.2:2222 namespace1 key1
test1

The push tool will send a request to the first accelerator and ask it to send all its data to the second accelerator. When it is done, the first accelerator will send back the “push completed” response with detail as to what was done.

There are additional, advanced configuration options you can research by running unity-accelerator config help | less and searching for Forward. You can specify the forwarding concurrency, queue size, error handling, etc.

Also note that you may wish to alter the configuration values for the MaintenanceStart and MaintenanceDuration of each mirrored accelerator so that they do not all shutdown for maintenance at the same time.

故障排除

如果您已经安装 Accelerator,但是某些 Unity Editor 无法使用它,则可能有多种原因导致出现此问题。以下故障排除选项可能有助于解决此问题:

检查使用的 Unity Editor 版本

Each project contributor must be using an Editor version 2019.3 or higher to use an Accelerator.

验证用户是否在 Accelerator 的本地网络中

Make sure the Accelerator is running on the same local area network as the project contributors experiencing issues. Accelerator does not affect contributors who are working remotely.

测试 Accelerator 的连接

检查遇到问题的计算机是否可以访问 Accelerator。如果使用 Unity Teams Advanced,请按照以下步骤在浏览器中访问 Accelerator 的运行状况页面:

1.在开发者控制面板中,选择 Collaborate > Accelerator。 2.单击您要检测的 Accelerator 的 Details。 3.单击 Accelerator IP 地址旁的信息图标以显示其运行状况页面的 URL。

如果没有使用 Unity Teams Advanced,请将 Accelerator 的主机 IP 地址输入到以下 URL 路径中以显示其运行状况页面:

[AcceleratorIP]:[AcceleratorPort]/api/agent-health

如果测试未通过,请确保所有主机和网络防火墙都允许访问 Accelerator 的监听 IP 地址和端口 (TCP)。您可能需要与网络管理员协调以允许访问此端口。

Check the Accelerator’s project configuration

If you use Unity Teams Advanced, verify that the Accelerator is configured for the project in question. Navigate to the project in the developer dashboard, and select Collaborate > Accelerator from the left navigation bar. You should see the Accelerator listed for that project.

验证 Accelerator 版本

对于 Linux 系统上安装的 Accelerator,所有 Linux 可执行文件均具有签名文件,您可以对这些文件进行验证以确保没有恶意实体篡改了您下载的 Accelerator 版本。您可以使用受信任的 GnuPG 版本来验证签名文件。以下密钥为最新版本签名。包含密钥的公钥块位于 https://collab-accelerator.cloud.unity3d.com/ 中。

pub rsa4096 2019-12-02
Key fingerprint = 9BC4 B04D F2E8 74E5 64AA 47E7 6D44 3B8B 002C F61F
uid       Unity Technologies ApS (Accelerator signing key) <sst-ops@unity3d.com>

要将密钥下载到您的 GPG 存储库,请使用以下命令之一:

$ gpg --keyserver https://collab-accelerator.cloud.unity3d.com/ --search-key "sst-ops@unity3d.com"

$ gpg --keyserver https://collab-accelerator.cloud.unity3d.com/ --recv-key 9BC4B04DF2E874E564AA47E76D443B8B002CF62F

要检查您安装的 Accelerator 版本是不是原始版本且未经修改,请验证该文件的签名。

Accelerator 安装文件随附了 https://storage.googleapis.com/unity-accelerator-prd/unity-accelerator-installer.sig 中提供的签名文件。使用此签名文件可以验证 Accelerator 安装程序:

$ gpg --verify unity-accelerator-installer.sig unity-accelerator-linux-x64-installer.run

在信任密钥之前,请将指纹与伪造或不受信任的密钥中显示的指纹进行对比。 信任密钥后,您将看到如下内容:

gpg: Signature made Thu Jan 16 12:29:14 2020 PST
gpg:                using RSA key 9BC4B04DF2E874E564AA47E76D443B8B002CF61F
gpg: Good signature from "Unity Technologies ApS (Accelerator signing key) <sst-ops@unity3d.com>" [ultimate]

这意味着签名有效,并且您已信任此密钥。

错误密钥

如果没有正确的分发密钥,以上命令的输出将如下所示:

gpg: Signature made Thu Jan 16 12:29:14 2020 PST
gpg:                using RSA key 9BC4B04DF2E874E564AA47E76D443B8B002CF61F
gpg: Can't check signature: No public key

在此情况下,您必须按照上文中的说明来获取密钥。

伪造或不受信任的密钥

如果您有包含有效签名的密钥副本,但是该密钥未被标记为受信任或该密钥是伪造的,则输出将如下所示:

gpg: Signature made Thu Jan 16 12:29:14 2020 PST
gpg:                using RSA key 9BC4B04DF2E874E564AA47E76D443B8B002CF61F
gpg: Good signature from "Unity Technologies ApS (Accelerator signing key) <sst-ops@unity3d.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 9BC4 B04D F2E8 74E5 64AA  47E7 6D44 3B8B 002C F61F

如果密钥是伪造的,则必须使用签名文件来验证指纹。 如果密钥未被标记为受信任,请编辑密钥,将其标记为受信任。有关更多信息,请参阅 https://www.gnupg.org/gph/en/manual/x334.html

支持

For help regarding Accelerator with Unity Teams, email support or submit a help ticket from the developer dashboard. To submit a ticket for a Unity Teams Advanced project, select your project, then select Collaborate > Support from the left navigation bar.

有关 Accelerator 与资源导入管线配合使用的帮助信息,请访问 Accelerator 论坛

将项目移动到另一个版本控制系统
Collaborate troubleshooting tips