> 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/building-for-supported-platforms/convai-xr/interacting-with-xr-ui-elements.md).

# 与 XR UI 元素交互

与 UI 交互的方式可能因您使用的 SDK 而异。对于诸如 **XR Interaction Toolkit** 是位于 **Meta SDK**等常用框架，您可以参考下面的文档。我们建议查看其他 SDK 的相关文档。

要使 **设置面板** 在 XR 环境中可交互，您可以在运行时测试麦克风，或在 Convai 中更改聊天 UI 的外观，请按照以下步骤操作：

## Meta SDK

### 步骤 1

右键单击 **Convai 设置面板**.

### 步骤 2

选择 **交互 SDK** 然后点击 **将射线交互添加到 Canvas**.

<figure><img src="/files/a282feb80b855cc2d5a8f1f46d24fa64f6acf764" alt="" width="563"><figcaption></figcaption></figure>

### 步骤 3

如果新窗口中出现警告，请点击 **修复** 按钮。

### 步骤 4

在 **设置** 部分，选择 **全部**。然后点击 **创建**.

<figure><img src="/files/ecd5464f3777d63e1cabebce08c4e7f5cb6c0262" alt="" width="540"><figcaption></figcaption></figure>

### 步骤 5

为防止 **ISDK\_RayInteraction** 在其 **设置面板** ，将其拖到 **面板** GameObject。

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

## XR Interaction Toolkit

### 步骤 1

点击 **Convai 设置面板**.

### 步骤 2

在 **检查器**，点击 **添加组件** 按钮。

添加 **Tracked Device Graphic Raycaster** 组件。

<figure><img src="/files/81a25bd05fe7dddcf5eec3a39fd04c5e450e30ee" alt="" width="563"><figcaption></figcaption></figure>


---

# 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/building-for-supported-platforms/convai-xr/interacting-with-xr-ui-elements.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.
