> 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/chang-jing-bian-ji-qi/ru-men/about-editor.md). Agents can also search and read this documentation through its [MCP server](https://docs.decentraland.org/~gitbook/mcp).

# 编辑场景

Scene Editor 是一个简单的可视化工具，可让你创建并发布 Decentraland 场景。

Creator Hub 内置了功能强大的场景编辑器，将简洁的无代码界面与编写代码进一步自定义场景的能力结合起来。

![创作者中心](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-68c59578e17b2182dd5ab0e0fa11cb5ed7a65ec4%2Ficon-creator-hub.webp?alt=media)

请参阅 [Creator Hub 安装](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/editor-installation.md) 以开始使用。

{% embed url="<https://www.youtube.com/watch?v=tK5-fyBVnK0>" %}

## 创建场景

要创建新场景，请打开 Creator Hub，然后点击 **创建** 按钮旁边的箭头。在下拉菜单中选择 **新建场景**.

![“创建”按钮的下拉菜单已展开，其中包含“新建场景”和“导入场景”选项。](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-68b6392ef998808cda1b392225cf7c5e75fef093%2Fcreate-dropdown.webp?alt=media)

接下来，系统会要求你为场景命名并选择保存位置。如果想从包含一些初始内容的项目开始，而不是从空场景开始，请点击 **模板** “ **场景** ”选项卡，然后选择一个模板。

请参阅 [管理场景](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/manage-scenes.md) 了解详情。

场景打开后，你会看到左侧的实体树、中间的画布、右侧所选项目的属性，以及底部的资源包。

![场景编辑器中打开了一个小型场景：左侧的实体树列出 Player、Camera、Scene 和几个项目；画布显示一片草地，上面有一台烧烤炉和一座鸟类喷泉；右侧的属性面板显示所选鸟类喷泉的 Transform 和 GLTF 组件。](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-83681e011189dbcb7eaacb2effe6e4bcb8ad2f0b%2Feditor-overview.webp?alt=media)

请参阅 [场景编辑器基础知识](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/scene-editor-essentials.md) 了解各个区域。

## 移动视角

要在场景编辑器中移动视角：

* 使用 **W** 和 **S** 向前或向后移动。你也可以使用鼠标滚轮，或按 **+** 和 **-** 键
* 使用 **A** 和 **D** 向左右移动。
* 使用 **Q** 和 **E** 向上或向下移动。
* 使用 **鼠标左键** 点击并选择项目，也可以拖动它们。
* 使用 **鼠标右键** 并拖动，以旋转摄像机视角。

{% hint style="info" %}
**💡 提示**：你也可以按住 **Alt** 在 Windows 上，或 **Option** 在 Mac 上拖动时。使用触控板而不是鼠标时，这尤其方便。
{% endhint %}

* 按 **空格键** 可将摄像机重置回默认位置

## 添加物品

在底部菜单中浏览主题资源包类别，找到可以放置在场景中的不同物品。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-bf56fe21f5916c77182abb3aa7b7ed99c67cde25%2Fasset-packs.webp?alt=media)

要放置物品，请从资源包菜单中点击并拖动该物品，将其放到画布场景中的某个位置。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-8561efddc6a8ddee20c36ede62504a8a5562c472%2Fdrop-item.webp?alt=media)

点击并拖动已选中的物品，即可让它在场景地面上自由移动。详情请参阅 [场景编辑器基础](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/scene-editor-essentials.md#position-items) 。

{% hint style="info" %}
**💡 提示**: 有些物品是 **智能物品**，内置了交互行为。详情请参阅 [智能物品](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/smart-items.md) 。
{% endhint %}

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-90308b58b54243d6359f739f40a4db710cdbd41a%2Fsmart-items.webp?alt=media)

资源面板的每个标签页都有搜索框。在 **资源包**中，面包屑导航和返回按钮会显示你当前所在的资源包。选择一个物品，即可在右侧预览窗格中查看它的描述和标签。有关该面板的全部功能，请参阅 [浏览和整理资源](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/gou-jian/import-items.md#browse-and-organize-your-assets) 。

要让 3D 视图占满窗口高度，请点击标签栏最右端的箭头按钮折叠资源面板。面板会收缩至仅显示标签页；再次点击同一按钮即可恢复到之前的高度。面板折叠时，点击任意标签页也会重新展开面板。

### 化身动画

“ **化身动画** ”资源包包含玩家化身的动画，而非可放置的物品：坐姿、钓鱼、搬箱子、跳舞等。这些动画与其他内容一样，分为 **动作**, **坐姿** 和 **表情** 类别。

将鼠标悬停在卡片上即可预览动画。将动画拖到 3D 视图中，即可将其文件复制到场景的本地资源中。此操作不会添加实体，因为动画并非场景中的实体，而是通过代码播放的。详情请参阅 [化身动画](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/jiao-hu-xing/tou-xiang/avatar-animations.md).

带有 **内置** 徽标的卡片有所不同。这些动画已随 Decentraland 一同提供，因此所有场景都可以播放，无需添加文件。你不能将它们拖入场景。请改为右键点击卡片并选择 **复制名称** ，以获取代码中要使用的名称。

在 **本地资源** 标签页中， **化身动画** 筛选器会汇总项目中的动画文件，并显示一个只读的 **内置动画** 文件夹，其中列出了无需文件即可使用的动画。

## 预览

要测试场景并像玩家一样体验它，请点击右上角的 **播放** 按钮。这会打开一个新窗口，启动 Decentraland Desktop Explorer，其中仅运行你的场景。在那里，你可以在场景中移动并与交互式物品互动。

{% hint style="warning" %}
**📔 注意**：如果你的设备上尚未安装，请从 **Decentraland 启动器** 下载： [Decentraland.org](https://decentraland.org).
{% endhint %}

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-10d53f215e20e8cf603bbf578d0b33df738d058f%2Fpreview-button.webp?alt=media)

点击 **Play** 按钮旁边的箭头，打开 **Play Options** 菜单，然后选择要在桌面客户端、浏览器还是手机上预览。有关所有可用选项的完整列表，请参阅 [预览场景](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/preview-scene.md) 。

## 场景渲染器

场景编辑器使用 **Babylon** 作为编辑画布的默认渲染器。你可以切换为 **Bevy（实验性）**.

更改渲染器的方法：

1. 点击左上角的 Creator Hub 徽标，然后选择 **设置**.
2. 前往 **EXPERIMENTAL** 选项卡。
3. 开启 **Enable Bevy Scene Renderer**.

![“应用偏好设置”对话框的 EXPERIMENTAL 选项卡，其中显示了“Enable Bevy Scene Renderer”开关。](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-f6ae19e4897ecd1a9bb3b0a61dcb4345e1635d87%2Fsettings-experimental.webp?alt=media)

Bevy 渲染器是编辑画布的另一种引擎。它会影响场景在编辑时的显示效果，但不会影响发布后玩家看到的效果。

使用 Bevy 渲染器时，工具栏会新增一个相机模式下拉菜单、用于在画布中运行场景的播放和停止按钮、一个 **Interact** 开关（手柄图标），以及一个 **Mute scene audio** 开关（扬声器图标）。

![Bevy 渲染器下的编辑器工具栏：撤销和重做、操纵器工具、显示“Free”的相机下拉菜单、播放和停止按钮、“Interact”手柄开关，以及“偏好设置”齿轮图标。](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-3d22d467c89c0fdee1f54a4590ef12cc6687c20e%2Feditor-toolbar-bevy.webp?alt=media)

使用 **Interact** 开关，无需打开单独的预览窗口，即可直接在编辑器画布中测试正在运行的场景。这样，你无需停止场景，就能快速检查交互效果。交互时，智能物品的悬停提示（例如要按下的按键）会直接显示在画布中。开启 **Interact** 后，操纵器和出生点手柄会隐藏起来，让你的点击操作能够作用于场景；关闭后，它们会重新显示。所选物品仍会保留轮廓。

### 已停止、播放中和已暂停

播放按钮会在画布中运行场景。场景运行时，同一个按钮会将其暂停；停止按钮则会将场景恢复到初始状态。画布中的显示内容取决于当前状态：

* **已停止**：打开场景或按下停止按钮后，会显示用于放置物品的编辑器视图。天空、太阳和雾会恢复默认值；无论场景设置了何种天空或光照，都会按正午的光照效果显示，并且场景 UI 会隐藏。使用 **Free** 相机时，附着在相机或玩家身上的物品（例如手电筒）会隐藏，以免它们跟随你的编辑相机移动。编辑器占位对象（例如 [触发区域](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/trigger-area.md) 和 [隐形墙](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/smart-items.md#invisible-walls)）会显示出来，方便你找到并选中它们。
* **播放中**：显示玩家看到的场景，包括场景自身的光照和 UI，以及通过 `Skybox`, `Sun` 和 `EnvironmentFog` 组件或 [Skybox 智能项](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/smart-items.md#skybox)。占位符会被隐藏。
* **已暂停**：所有内容都保持播放时的样子，包括场景的天空、太阳和雾效；天空的时间也会停留在原来的时刻。

这些视图只会改变编辑器的显示内容，不会将任何内容写入场景文件。

### 多人游戏服务器停止时

如果场景使用了 [多人游戏服务器](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.md)，也就是说，它是使用 `@dcl/sdk@auth-server` SDK 构建的，那么场景打开时，编辑器会运行该服务器。使用常规 SDK 的场景在编辑器中没有服务器。如果服务器意外停止，Creator Hub 会自动重启服务器并重新加载编辑器，同时向你显示一条消息。如果服务器在一分钟内停止超过 3 次，Creator Hub 就会停止尝试，场景将在没有服务器的情况下运行。点击消息中的 **重试** 即可重新启动服务器，这也会重新加载编辑器。

在 Bevy 渲染器下打开场景时，场景默认静音，因此你工作时编辑器不会发出声音。静音会影响场景中的所有 [音频源](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/3d-nei-rong-ji-chu/sounds.md)、音频流和视频，以及化身的脚步声；无论是在编辑时还是场景在画布中运行时都如此。点击标记为 **取消场景静音**的扬声器按钮即可听到场景声音。只要场景保持打开，你的选择就会持续生效，即使场景重新加载也一样；下次打开场景时则会再次静音。此按钮仅在 Bevy 渲染器下显示，因为 Babylon 渲染器不会播放场景音频。

Bevy 编辑器还会加载 [自定义项](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/custom-items.md)，为损坏或缺失的资源显示占位标记，并在场景的 SDK 依赖项过时时提供易于理解的错误消息和修复操作。工具栏中的摄像机切换按钮会根据当前模式显示 **自由** 或 **玩家**。

在 **自由** 摄像机模式下：

* 使用 W、A、S、D 键飞行，使用空格键、E 键和 Q 键上下移动。化身处于隐藏状态，因此这些按键不会让它走动。开始播放场景或切换到 **玩家** 摄像机时，化身就会出现。
* 使用鼠标滚轮或触控板缩放。滚动一格的缩放幅度与点击一次工具栏缩放按钮相同。
* 摄像机不能移动到地面以下。

与默认渲染器一样，拖动操纵器时按住 **Shift** 可关闭吸附；如果 **吸附** 已关闭，则可按住该键开启吸附。请参阅 [放置项](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/scene-editor-essentials.md#position-items).

{% hint style="warning" %}
**📔 注意**：Bevy 下无法使用场景指标标签页。请在桌面或移动客户端中运行场景预览，并在那里查看统计信息。
{% endhint %}

{% hint style="warning" %}
**注意：** Bevy 渲染器仍处于实验阶段，可能不支持默认 Babylon 渲染器所支持的全部编辑功能。
{% endhint %}

## 场景设置

点击屏幕右上角的 **铅笔图标** 。这会打开一系列场景级属性供你编辑，包括名称、缩略图、场景大小等。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-c9ae81ae9e27d05520ae060ebf5f2c74a5ba4663%2Fpencil-icon.webp?alt=media)

请参阅 [场景设置](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/pei-zhi/scene-settings.md) 了解更多详情。

## 发布场景

场景调整满意后，点击 **发布** 按钮。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-e4859de1ebc8d3bd6d76b348cfa66fcb4572a029%2Fpublish-options.webp?alt=media)

请参阅 [发布场景](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/fa-bu/publish-scene.md) 了解更多详情。

## 另请参阅

* 请参阅 [场景编辑器基础知识](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/scene-editor-essentials.md) 了解场景编辑器界面的更多信息。
* 请参阅 [智能物品](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/smart-items.md) 了解如何为场景添加简单的交互功能。
* 请参阅 [结合代码使用](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/shi-yong-dai-ma-kuo-zhan/overview.md) ，了解如何编辑场景代码。
* 请参阅 [发布场景](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/fa-bu/publish-scene.md) 了解如何将场景发布到 Decentraland。


---

# 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/chang-jing-bian-ji-qi/ru-men/about-editor.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.
