> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/mian-xiang-yi-dong-duan-gou-jian/kai-fa/preview-on-mobile.md).

# 在移动设备上预览

从 Creator Hub 或 CLI 在真实移动设备上预览你的场景。

你可以直接通过 Creator Hub 或命令行，在 Decentraland 移动应用中预览场景。这是确认界面、输入处理和性能在真实设备上表现可靠的唯一有效方式。

## 准备条件

* 手机上已安装 Decentraland 移动应用 — 请参阅 [下载链接](https://docs.decentraland.org/creator/content-creator-zh/mian-xiang-yi-dong-duan-gou-jian/yi-dong-ke-hu-duan/overview.md#get-the-mobile-app).
* 手机和开发设备必须连接到 **同一个本地网络** （Wi-Fi）。预览由你的计算机提供；二维码链接到局域网 URL。

## 选项 A — 通过 Creator Hub

1. 在 Creator Hub 中打开场景。
2. 点击 **播放** 按钮旁边的箭头，打开 **播放选项**，然后选择 **显示移动设备二维码**.
3. 用手机摄像头扫描显示的二维码。链接会打开 Decentraland 移动应用并加载场景预览。点击弹窗周围的深色区域即可关闭弹窗。

<figure><img src="https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-0ddc491f10139982fa912b82f7de6bb036bdda01%2Fmobile-preview-creator-hub.webp?alt=media" alt="Creator Hub Play Options menu with the Show QR Code for Mobile option"><figcaption><p>Creator Hub“播放选项”菜单中的“显示移动设备二维码”选项。</p></figcaption></figure>

## 选项 B — 通过命令行

在场景项目的根目录下运行：

```bash
npm run start -- --mobile
```

CLI 会在终端中输出一个指向场景局域网 URL 的二维码。用手机扫描二维码，即可在 Decentraland 移动应用中加载场景。

<figure><img src="https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-f2acf45611e8fea4cfc1b193724bab888d0e17b6%2Fmobile-preview-cli-qr.webp?alt=media" alt="QR code printed by the Decentraland CLI for mobile preview"><figcaption><p>由 <code>npm run start -- --mobile</code>生成的二维码。用手机扫描二维码，即可在 Decentraland 移动应用中打开场景。</p></figcaption></figure>

{% hint style="info" %}
**💡 提示**：传入 `--mobile`后，桌面版 Explorer 不会同时启动。如果想同时在两种设备上测试，请在一个终端中运行 `npm run start` 以启动桌面版，并在另一个终端中运行 `npm run start -- --mobile` 以启动移动版。
{% endhint %}

## 热重载

与桌面预览一样，修改场景文件后，移动端预览也会自动重新加载。每次编辑后都不必重新扫描二维码。

## 故障排除

* **二维码无法打开应用** — 请确认已安装 Decentraland 应用，并且至少在该设备上打开过一次。
* **手机无法连接预览服务器** — 请确认手机和开发设备连接的是同一个 Wi-Fi 网络。有些企业网络会隔离客户端；遇到这种情况，请使用个人热点或其他网络。
* **场景在手机上加载后，显示效果与桌面端不同** — 这是正常现象。请借此机会验证 [安全区域](https://docs.decentraland.org/creator/content-creator-zh/mian-xiang-yi-dong-duan-gou-jian/kai-fa/safe-area.md), [界面尺寸](https://docs.decentraland.org/creator/content-creator-zh/mian-xiang-yi-dong-duan-gou-jian/kai-fa/ui-best-practices.md#sizing)以及 [输入绑定](https://docs.decentraland.org/creator/content-creator-zh/mian-xiang-yi-dong-duan-gou-jian/kai-fa/input-on-mobile.md).

## 相关内容

* [预览场景](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/preview-scene.md)
* [使用 CLI](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/using-the-cli.md)
* [在移动端 Discover 中获得推荐展示](https://docs.decentraland.org/creator/content-creator-zh/mian-xiang-yi-dong-duan-gou-jian/fa-bu/get-featured.md)


---

# 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.decentraland.org/creator/content-creator-zh/mian-xiang-yi-dong-duan-gou-jian/kai-fa/preview-on-mobile.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.
