> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/unity-importing-ready-player-me-rpm-characters.md).

# 导入 Ready Player Me（RPM）角色

## **简介**

Ready Player Me（RPM）让用户能够轻松创建和自定义 3D 头像。通过将 RPM 角色集成到 Convai 的 Unity SDK 中，你可以借助先进的 AI 驱动交互，让动态 NPC 栩栩如生。本指南将逐步介绍如何在你的 Unity 项目中使用 Convai 设置 RPM 角色。

## **前提条件**

在开始之前，请确保你拥有以下内容：

* 一个 [**Ready Player Me**](https://readyplayer.me/) 账户
* 一个 **模型链接** 用于你的 RPM 角色
* 一个 **Unity 项目** 并且具有 **Convai SDK** 已安装并正常运行

## 逐步指南

### 步骤 1：在 Unity 中安装 Ready Player Me SDK

1. 打开 **Unity** 并导航到 **窗口 > 包管理器**.

<figure><img src="/files/05fc96c26dda311b158fd7714245f421752526da" alt=""><figcaption></figcaption></figure>

2. 点击 **(+)** 图标并选择 **从 Git URL 安装包**.

<figure><img src="/files/25599d47b5891e30ea596f93b114765ba1a0a712" alt=""><figcaption></figcaption></figure>

3. 输入以下 Git URL，然后点击 **安装**:

`https://github.com/readyplayerme/rpm-unity-sdk-core.git#f6ea3c4b0a8891b7c4c1d7b269cee545185549fb`

<figure><img src="/files/b219bb0eee57eb2fc920d45da65c050421a4ed49" alt=""><figcaption></figcaption></figure>

4. 等待安装完成。

### 步骤 2：配置 RPM 头像

1. 在 **项目面板**，导航到： **Assets > Ready Player Me > Resources > Settings**

<figure><img src="/files/2e355e305c5b9bb5e5551f2653643d4d83586796" alt=""><figcaption></figcaption></figure>

2. 在文件夹内右键单击，然后转到 **创建 > Ready Player Me > 头像配置**.

<figure><img src="/files/d6de8943eca1f7d2d9d7de77d3892ee7f4ee0af9" alt=""><figcaption></figcaption></figure>

3. 这将生成一个 **头像配置** 资源。
4. 选择创建的资源，并在 **检查器面板**中找到 **Morph Targets** 部分。
5. 点击 **Add**，选择所需的形态目标 **（Oculus Visemes 和 ARKit）**，并保存该资源。

<figure><img src="/files/95abac384790b0b14c2d5118a34610ef3452f8a1" alt=""><figcaption></figcaption></figure>

6. 找到 **Assets > Ready Player Me > Resources > Settings > AvatarLoaderSettings** 并将 **头像配置** 资源分配给 **头像配置** 字段。

<figure><img src="/files/20c8a78479e409dd5ee6a737c36141e8b6c038b1" alt=""><figcaption></figcaption></figure>

7. 保存该资源。

### 步骤 3：导入 RPM 角色

1. 导航到 **工具 > Ready Player Me > Avatar Loader**.

<figure><img src="/files/4e8c7c6efef738a768ee1958b853609486eb7f5b" alt=""><figcaption></figcaption></figure>

2. 粘贴或输入你的 **RPM 模型链接** 到提供的输入字段中。

<figure><img src="/files/5219a718fe6829fa7e28695ca8c35024dada1353" alt=""><figcaption></figcaption></figure>

3. 点击 **将化身加载到当前场景** 以导入你的角色。

### 步骤 4：集成 Convai 组件

1. 选择你导入的 **RPM GameObject** 在 **层级面板**.
2. 添加 **Convai NPC** 组件到该 GameObject。
3. 填写 **名称和 ID** ，填写你希望集成的 Convai NPC 的名称和 ID。

<figure><img src="/files/da1ad47c8a4380eadebba201aa5dfbac3b1e0b36" alt=""><figcaption></figcaption></figure>

4. 点击 **添加组件** 在 **Convai NPC** 组件。

<figure><img src="/files/e7a8132b26210fba89839caf2f5cc06f84fbbeda" alt=""><figcaption></figcaption></figure>

5. 选择你想要的组件并点击 **应用更改**.

<figure><img src="/files/3d6735a6252dbaa544ce9f9e4ef407c8c050be92" alt=""><figcaption></figcaption></figure>

6. 添加一个 **胶囊碰撞体** 到该 GameObject，并配置其 **大小** 和 **中心** 以与角色的身体比例对齐。确保碰撞体能够准确包围角色，以获得最佳的物理交互和碰撞检测。

<figure><img src="/files/6af221d9dd2df0f7017930a6515cb22de631a899" alt=""><figcaption></figcaption></figure>

7. 分配一个 **动画控制器** 给该 GameObject 的 Animator 组件。该 **Convai SDK** 提供两个预定义的动画控制器（**女性** 和 **男性**）供你使用。或者，你也可以集成一个根据你的需求定制的控制器。

<figure><img src="/files/4d45f5aedbc8c3417436d2693187c9e9a4d9a277" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**通过附加功能增强你的角色：**

* **添加 LipSync**：按照 [本指南](/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/adding-lip-sync-to-your-character.md) 将 LipSync 集成到你的角色中。
* **实现叙事设计**：查看 [本指南](/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/adding-narrative-design-to-your-character.md) 以添加叙事设计。
* **设置动作**：使用以下内容探索基于动作的交互 [本指南](/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/adding-actions-to-your-character.md).
  {% endhint %}

### 结论

你已成功将 Ready Player Me 角色集成到由 Convai 驱动的 Unity 项目中。现在你可以利用 Convai 的能力，让智能、交互式 NPC 栩栩如生。 :tada::sunglasses:

{% hint style="info" %}
有关 Ready Player Me 的更多详情，请访问 [Ready Player Me](https://docs.readyplayer.me/ready-player-me/integration-guides/unity).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/unity-importing-ready-player-me-rpm-characters.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.
