# 开发者工具

我们为你打造这些工具，秉持一个简单的信条：“成功团队的关键在于快速迭代和频繁测试”。如果你发现任何改进机会，请在我们的 [社区 Discord](https://discord.gg/NgCnkHbsGp)中告诉我们。我们希望你会有流畅的体验。🚀

{% hint style="info" %}
[寻找真实世界的示例](/zh/docs/sample-projects/unity-netcodes.md) 你可以将其用作项目起点并进一步修改。
{% endhint %}

## ⚡ 专用服务器快速入门插件

直接从你的 Unity 编辑器中构建并将你的专用游戏服务器启动到云端！

* [适用于 Unity 的专用服务器插件 - 交钥匙解决方案、源代码和完整发布说明。](https://github.com/edgegap/edgegap-unity-plugin)

{% hint style="success" %}
该插件完全免费提供，受免费套餐条款与条件约束。
{% endhint %}

所有 2021.3+ 之后的 Unity3D 长期支持（LTS）版本都官方支持。

此插件包含旨在帮助你完成以下任务的功能：

* 为 Linux 构建并容器化你的专用服务器，
* 在本地测试你的服务器 Docker 镜像，
* 将你的服务器上传并部署到 Edgegap 上。

{% hint style="info" %}
此插件不会修改任何游戏行为，它只是一个方便的 Edgegap 任务开发工具。该插件不会包含在你的构建中，因为它仅在服务器构建准备期间使用。
{% endhint %}

#### 安装

{% hint style="success" %}
参见 [Unity](/zh/unity.md) 以开始使用并获取有关插件使用的详细说明。
{% endhint %}

<details>

<summary>故障排除和常见问题</summary>

Unity 错误： `[包管理器窗口] 添加包时出错：https://github.com/edgegap/edgegap-unity-plugin.git`

* 要通过 git URL 添加我们的插件，你需要安装 git 客户端（[#installation](#installation "mention")).

***

Unity 错误： `缺少 Linux 构建支持`

* 参见 [#usage-requirements](#usage-requirements "mention")，你很可能缺少 Linux 构建支持模块，你可以通过 Unity Hub 安装它们。请确保选择与你项目相同的 Unity 版本。

</details>

{% hint style="info" %}
**面向插件开发者** - 如果你想在用户的编辑器中检测此插件是否存在，可以使用编译指令 `#if EDGEGAP_PLUGIN_SERVERS {your code} #endif` .
{% endhint %}

## ⭐ 软件开发工具包

{% hint style="info" %}
**最新版本的 Unity SDK 是 `3.0.0`**。本文档中的所有示例均为最新。
{% endhint %}

<details>

<summary>故障排除和常见问题</summary>

Unity： `[包管理器窗口] 添加包时出错：https://github.com/edgegap/edgegap-unity-sdk.git`

* 要通过 git URL 添加我们的插件，你需要安装 git 客户端。

***

Visual Studio： `无法找到类型或命名空间名称` ，针对 Edgegap 命名空间。

1. 在 Unity 编辑器中，导航到 **编辑 / 首选项 / 外部工具 / 生成 .csproj 文件**.
2. 确保你已启用 **Git 包**.
3. 点击 **重新生成项目文件**.

</details>

## 📫 分布式中继传输库

为你的网络代码库寻找一个自定义传输，以便在点对点游戏中利用分布式中继。

[查看文档](/zh/learn/distributed-relay/relay-transport-samples.md):

* 下载 Edgegap 中继示例：
  * [Mirror 示例](https://github.com/edgegap/unity-mirror-relay-sample),
  * [FishNet 示例](https://github.com/edgegap/unity-fishnet-relay-sample),
  * [Unity NGO 示例](https://github.com/edgegap/unity-ngo-relay-sample).
* [Edgegap 中继传输库 - 适用于受支持网络代码的源代码和发布说明。](https://github.com/edgegap/distributed-relay-examples)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.edgegap.com/zh/unity/developer-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
