> 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 Avatar

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. 在文件夹内右键，然后依次选择 **Create > Ready Player Me > Avatar Configuration**.

<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. 这将生成一个 **Avatar Config** 资源。
4. 选择创建的资源，然后在 **检查器面板**中找到 **变形目标** 部分。
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** 并指定 **Avatar Config** 资源添加到 **Avatar Config** 字段。

<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. 导航至 **Tools > 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. 点击 **Load Avatar into Current Scene** 以导入你的角色。

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

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

<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" %}
**为角色添加更多功能：**

* **添加口型同步**：请参阅 [本指南](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/adding-lip-sync-to-your-character.md) 将 LipSync 集成到你的角色中。
* **实现叙事设计**：查看 [本指南](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin/adding-narrative-design-to-your-character.md) 以添加叙事设计。
* **设置操作**：通过 [本指南](https://docs.convai.com/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.
