> 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）角色导入到由 Convai 驱动的 Unity 项目中、进行配置并集成 Convai NPC 组件的过程。

## **简介**

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="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FY85DfN4FjLfdgF0G9uAS%2FUntitled.png?alt=media&amp;token=258271fb-c613-4222-877e-dc56895d0c39" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F6tMlNoO67TYrhLgTzYIL%2FUntitled.png?alt=media&amp;token=b27dc668-869a-442a-989b-346fd4a9eef3" alt=""><figcaption></figcaption></figure>

3. 输入以下 Git URL 并点击 **安装**:

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FgWd5lb0hZbIAAVkYjToa%2FScreenshot%202025-03-23%20034148.png?alt=media&amp;token=ffb5f4a5-5096-4ba5-8e23-ee832b94df8a" alt=""><figcaption></figcaption></figure>

4. 等待安装完成。

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

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FWTFN4P5MrmnTPTD38FDV%2FUntitled.png?alt=media&amp;token=eb6c8afd-aed1-40ee-bea3-fba2b3baabc3" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F57rM4WO54XO0nOLBPGZM%2FUntitled.png?alt=media&amp;token=0f3fe1ce-376e-42ba-aefb-eb0c2d064e99" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FxO0pPFoBIYoxMqbYBSpV%2FScreenshot%202025-03-24%20160022.png?alt=media&amp;token=ecbc4fb6-0119-46ab-bb54-af299ada7594" alt=""><figcaption></figcaption></figure>

6. 找到 **Assets > Ready Player Me > Resources > Settings > AvatarLoaderSettings** 并分配 **头像配置** 资源到 **头像配置** 字段从其他 GameObject 分配一个角色。

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2Fk60vGga6VTfnkXByWgLq%2FUntitled.png?alt=media&amp;token=9c1ae6b6-746e-4ede-9d2d-9b5bd5ea470a" alt=""><figcaption></figcaption></figure>

7. 保存该资源。

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

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2Fbf0ok1KcOIWr2fbo1QIv%2FUntitled.png?alt=media&amp;token=27894f76-10c6-4aea-b5ea-0c28b19e7afe" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F7WwAxmPAs4rwKoIztSnJ%2FUntitled.png?alt=media&amp;token=980ee967-c144-45bc-b878-41b088f9424b" alt=""><figcaption></figcaption></figure>

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

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

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FgFUom3zLKxOXwboKM02K%2FUntitled.png?alt=media&amp;token=0be1ba98-8855-4096-ae54-27a9254c2f8b" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FYxFlo5fjgeloFG9PZwQY%2FUntitled.png?alt=media&amp;token=17d759ff-da7c-4a4f-8f0f-1c413b0b9ba2" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F9pJuLAr0koikJ9Ds9bYO%2FUntitled.png?alt=media&amp;token=bf307858-2c16-42f9-a561-cb205a17b161" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FhQlg9Xz60wxBgx0HVnDQ%2Fimage.png?alt=media&amp;token=cf46d0a5-51ae-4d6e-b739-564466e7f4db" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FeELq2uZ8NMf4bFgiT4YS%2Fimage.png?alt=media&amp;token=17e8ba3c-14e1-4486-b2bb-6018c00e1049" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
