> 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-sdk7/ru-men/sdk-101.md).

# SDK 快速开始

使用 Creator Hub、SDK 和官方 SDK Skills 通过 AI 辅助 vibe coding 创建你的第一个 Decentraland 场景。

本教程将带你创建第一个场景，并结合使用多种可用工具：Creator Hub 的可视化场景编辑器、使用 Decentraland SDK 手动编写代码，以及 AI 辅助的 **氛围编程**。你将同时使用这三种方式，并了解它们各自适合发挥作用的场景。

## 如何创建 Decentraland 场景？

1. **安装** [**Creator Hub**](https://decentraland.org/download/creator-hub)，这是用于创建、预览和发布场景的官方桌面应用。无论创作者的技能水平如何，我们都推荐使用它。
2. **如果你使用 AI 编程助手** （例如 Claude Code、Cursor 或 Copilot），请安装官方 [Decentraland SDK Skills](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/vibe-coding.md) ，让它掌握经过验证的 SDK7 编写模式： `npx skills add decentraland/sdk-skills`
3. **对于高级用户和自动化工作流，** [**CLI**](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/using-the-cli.md) 是另一种选择。

本教程余下部分将逐步介绍这条推荐路径。

## 安装 Creator Hub

Creator Hub 可用于构建、预览和部署 Decentraland 场景。下载 Creator Hub： [此处](https://decentraland.org/download/creator-hub).

要编辑场景代码，你还需要一个代码编辑器。 [Visual Studio Code](https://code.visualstudio.com/) 和 [Cursor](https://www.cursor.com/) 都是不错的选择，不过任何代码编辑器都可以。

更多详情请参阅 [安装指南](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/editor-installation.md) 。

## 创建你的第一个场景

1. 打开 Creator Hub。
2. 选择 **场景** 选项卡，然后点击 **新建场景**.

   ![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-e5671a1706f73b79a9baffeda0c81d5d9e4cb53d%2Fnew-scene.webp?alt=media)
3. 选择一个起始模板。本次练习请选择 **空场景**.

此步骤可能需要几分钟。系统会在你的文件夹中填入基本场景所需的一组默认文件。完成后，你将看到场景的空网格。

## 从资源包中添加项目

在场景编辑器底部区域浏览 **资源包** ，然后将几个项目拖到场景中。现在放什么都可以。

![](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://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/scene-editor-essentials.md#position-items) 。

{% hint style="info" %}
**💡 提示**：用地面项目覆盖整个场景。类型为 **地面** 的项目上带有油漆桶图标。将其中一个拖入场景后，它会用该项目的副本覆盖场景中的整个地面。

<img src="https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-98bc75e11e441e06ff960c54f1f6c5aad7e3a15f%2Fground.webp?alt=media" alt="Ground" data-size="original">
{% endhint %}

## 运行预览

点击 **播放** 顶部菜单中用于在 Decentraland 中加载场景的按钮。现在，你可以化身为 Decentraland 中的虚拟形象，探索这个场景。

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

你可以在工作时保持预览窗口打开：每次进行更改时，预览都会更新。更多信息请参阅 [预览场景](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/preview-scene.md).

## 自定义 3D 资源

下载这个牛油果 3D 模型，格式为 *glb* ，请使用以下 [链接](https://github.com/decentraland-scenes/avocado/raw/main/avocado-glb.zip) ，然后解压文件。

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

将 **avocado.glb** 文件从文件浏览器拖到场景编辑器底部面板中（即包含 **资源包** 和 **本地资源** 选项卡的同一面板），然后点击 **导入**.

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

现在，你可以在 **avocado.glb** 模型位于 **本地资源** 选项卡中的 **场景** 文件夹里找到它。像从资源包中拖入其他项目一样，将该文件拖到场景中。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-0091f4323556b933ae81eba77e60eb639169b2a5%2Favocado-in-local-assets.webp?alt=media)

## 编辑场景代码

点击顶部菜单中的 **<> Code** 按钮，在代码编辑器中打开场景项目。

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

{% hint style="warning" %}
**📔 注意**：如果没有打开任何内容，请确保已安装代码编辑器，例如 [Visual Studio Code](https://code.visualstudio.com/) 或 [Cursor](https://www.cursor.com/) 。
{% endhint %}

在代码编辑器左侧边栏中，你可以浏览项目的文件和文件夹结构。打开 `index.ts` 文件，它位于 `src` 文件夹中。文件内容应如下所示：

```ts
import {} from '@dcl/sdk/math'
import { engine } from '@dcl/sdk/ecs'

export function main() {}
```

Decentraland 场景使用 [TypeScript](https://www.typescriptlang.org/)编写，并使用 Decentraland SDK：这是一个包含所需功能的库，可用于放置 3D 内容、添加交互功能，以及控制场景中的各种行为。

此文件定义了一个名为 `main()`的函数，它是场景的入口点：放在其中的任何代码都会在场景首次加载时运行。

你已经通过可视化操作将一个牛油果拖入场景中。现在，我们通过编写代码再添加一个。替换你的 `index.ts` 包含以下内容的文件：

```ts
import { Vector3 } from '@dcl/sdk/math'
import { engine, Transform, GltfContainer } from '@dcl/sdk/ecs'

export function main() {
	// 创建一个全新的实体
	let avocado2 = engine.addEntity()

	// 为它添加 Transform
	Transform.create(avocado2, {
		position: Vector3.create(8, 0, 8),
	})

	// 为它添加 GLTF
	GltfContainer.create(avocado2, {
		src: 'assets/scene/avocado.glb',
	})
}
```

这些代码行会创建一个新的 [实体](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/jia-gou/entities-components.md)，为它添加一个基于你下载的 3D 模型的 [形状](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/3d-nei-rong-ji-chu/shape-components.md) ，并通过 [设置其位置](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/3d-nei-rong-ji-chu/entity-positioning.md) ，使用 **Transform** 组件。

一般来说，你在 `index.ts` 中编写的代码都应该放在 `main()` 中（或放在由 main 间接调用的其他函数中）。有关详情，请参阅 [场景生命周期](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/coding-scenes.md#scene-lifecycle) 。

运行场景预览：现在你应该能看到两个牛油果，一个是在场景编辑器中添加的，另一个是通过代码添加的。

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

{% hint style="warning" %}
**📔 注意**：第二个牛油果 **仅存在于你的代码中**。运行场景时会显示它，但场景编辑器画布和实体树无法显示在 `index.ts`中创建的实体。如果你在编辑器中看不到它，不必担心。在混合使用可视化编辑和代码时，请牢记这一点。
{% endhint %}

两个牛油果由相同的组件构成。在场景编辑器中选择 **第一个** 牛油果：属性面板会显示一个 **Transform** 和一个 **GltfContainer** 组件，其中包含的字段类型与你刚才在代码中编写的相同。它们是同一事物的两种视图。

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

## 使用脚本添加交互

让我们让牛油果对玩家做出响应。我们可以把代码添加到刚才编辑的 `index.ts` 中来实现，但这次我们改用 **Script 组件**：通过它可以将代码直接附加到场景编辑器中的项目上。这样每个项目的行为都能独立封装，而且你甚至可以在多个项目上重复使用同一个脚本。

1. 在场景编辑器中选择第一个牛油果（也就是你拖入的那个；请记住，这里看不到仅由代码创建的牛油果）。
2. 点击 **+** 属性面板顶部的按钮，然后选择 **脚本** 以添加脚本组件。
3. 点击 **+ 创建新脚本** 并将其命名为 `AvocadoScript`.

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

4. 点击脚本组件上的 **<> 代码** 按钮，在代码编辑器中打开新文件。

该脚本是一个包含三个主要部分的类（为简洁起见，省略了注释）：

```ts
import { engine, Entity } from '@dcl/sdk/ecs'
import {} from '@dcl/sdk/math'

export class AvocadoScript {
	constructor(
		public src: string, // DO NOT REMOVE
		public entity: Entity, // DO NOT REMOVE
		// 在下方添加自定义输入
	) {}

	start() {
		// 场景加载时调用一次
	}

	update(dt: number) {
		// 每一帧都会调用
	}
}
```

* 这个 **构造函数** 用于定义参数，这些参数会显示为 Creator Hub 中 Script 组件上的可编辑字段。不要删除 `src` 或 `entity`.
* **`start()`** 会运行 **一次**，当场景加载时。可用它进行初始化：创建组件、注册点击处理程序等。
* **`update(dt)`** 会在游戏的 **每一帧** 运行，频率与引擎渲染帧率相同（例如，60 FPS 时每秒运行 60 次）。可用它实现持续行为，例如移动。 `dt` 表示自上一帧以来经过的秒数。

在类内部， `this.entity` 始终指向挂载了 Script 组件的实体：在本例中，就是你的牛油果。这正是脚本可以重复使用的原因：将同一个脚本附加到十个物品上，每个物品都会对自身执行操作。

### 用氛围编程编写你的第一个交互

你可以手动编写以下代码，不过现在正是尝试 **氛围编程**的好时机：向 AI 助手描述你想要什么，让它来编写代码。大多数代码编辑器都内置了 AI 助手，例如 Cursor 的聊天功能、VS Code 中的 GitHub Copilot，或 [Claude Code](https://claude.com/product/claude-code)。你也可以在代码编辑器之外编写提示词，例如使用 Claude Desktop 或命令行中的 Claude Code。

在输入第一个提示词之前，请安装 Decentraland SDK 技能，让 AI 了解该 SDK 的常用模式，从而大幅减少错误：

```bash
npx skills add decentraland/sdk-skills
```

这些技能是参考文档；每当 AI 不确定如何使用 SDK 完成某项操作时，都会查阅这些文档，从而编写正确的代码，而不是凭空猜测。请参阅 [使用 AI 进行氛围编程](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/vibe-coding.md) 以获取设置选项和提示建议。

现在试试这样的提示：

> 在 AvocadoScript.ts 中，让玩家点击牛油果时，它在控制台输出一条消息。

最终代码应该类似这样（也可以直接粘贴进去）：

```ts
import { engine, Entity, pointerEventsSystem, InputAction } from '@dcl/sdk/ecs'
import {} from '@dcl/sdk/math'

export class AvocadoScript {
	constructor(
		public src: string,
		public entity: Entity,
	) {}

	start() {
		pointerEventsSystem.onPointerDown(
			{
				entity: this.entity,
				opts: { button: InputAction.IA_POINTER },
			},
			() => {
				console.log('CLICKED AVOCADO')
			}
		)
	}

	update(dt: number) {}
}
```

它在 `start()` 函数中添加了一些点击行为。我们只需定义一次点击行为，每当玩家点击该物品时，它都会作出响应。 `pointerEventsSystem.onPointerDown()` 语句定义了三项内容：

* 点击事件作用于哪个 `entity` ：这里是 `this.entity`，也就是挂载了该脚本的牛油果。
* 一个 `opts` 对象：要使用哪个按钮，以及其他我们暂时不会用到的可选参数。
* 每当实体被点击时运行的函数。

要查看输出的消息，请运行预览，然后点击右上角的 ![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-a673f6b987216e9e471fdac882879c44fcf94652%2Fconsole-icon.png?alt=media\&token=1965a51b-d4b0-4caa-b9d5-d24d738c1fb8) 图标打开控制台。你也可以按 **\`** 键来切换控制台。每次点击牛油果时，都会看到一行新内容：

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

{% hint style="warning" %}
**📔 注意**：实体必须具有碰撞体几何形状才能被点击。此处使用的模型已包含碰撞体。对于不包含碰撞体的模型，解决方法请参阅 [碰撞体](https://docs.decentraland.org/creator/content-creator-zh/3d-jian-mo-yu-dong-hua/colliders.md) 。
{% endhint %}

### 让牛油果消失

现在让点击操作变得更有意思！向 AI 助手提出请求：

> 点击牛油果时，让它消失。我希望它以弹跳缩小的动画消失。另外，当我将指针移到牛油果上时，显示的提示文字应为“收集”。

最终代码应该类似这样：

```ts
import { engine, Entity, pointerEventsSystem, InputAction, Tween, EasingFunction } from '@dcl/sdk/ecs'
import { Vector3 } from '@dcl/sdk/math'

export class AvocadoScript {
	constructor(
		public src: string,
		public entity: Entity,
	) {}

	start() {
		pointerEventsSystem.onPointerDown(
			{
				entity: this.entity,
				opts: { button: InputAction.IA_POINTER, hoverText: 'Collect' },
			},
			() => {
				this.collect()
			}
		)
	}

	collect() {
		Tween.setScale(
			this.entity,
			Vector3.One(),
			Vector3.Zero(),
			500,
			EasingFunction.EF_EASEINBOUNCE
		)
	}

	update(dt: number) {}
}
```

我们来看看 AI 做了什么。

* 为了实现弹跳动画，它使用了 **Tween**。补间动画描述实体的位置、旋转或缩放随时间逐渐变化的过程。这里 `Tween.setScale()` 会将牛油果从完整大小（`Vector3.One()`）缩小至消失（`Vector3.Zero()`），耗时 500 毫秒，并采用弹跳缓动曲线。详细了解补间动画，请参阅 [移动实体](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/3d-nei-rong-ji-chu/move-entities.md).
* 它没有直接在点击函数中编写补间动画，而是创建了一个单独的 `collect()` 方法。这并非必需（如果你的 AI 把补间动画放进了点击函数，也完全可行），但这是个好习惯：方法能让代码更易读，还能让你在不同位置重复使用相同的逻辑。
* 要在牛油果上显示“收集”提示，它将该提示设为 `hoverText` 的值。

运行预览并点击牛油果：它应该会潇洒地消失。

{% hint style="warning" %}
**📔 注意**：牛油果会缩小到 0，但实体仍然存在。理想情况下，应在补间动画结束后删除该实体，以减轻场景负担。请参阅 [补间动画结束时](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/3d-nei-rong-ji-chu/move-entities.md#on-tween-finished).
{% endhint %}

### 每帧运行代码

到目前为止，我们的代码都在 `start()`中运行。现在使用 `update()` 让牛油果持续旋转。替换构造函数和 `update()` 为：

```ts
	constructor(
		public src: string,
		public entity: Entity,
		public speed: number = 45,
	) {}

	update(dt: number) {
		const transform = Transform.getMutable(this.entity)
		transform.rotation = Quaternion.multiply(
			transform.rotation,
			Quaternion.fromAngleAxis(this.speed * dt, Vector3.Up())
		)
	}
```

你还需要将 `Transform` 和 `Quaternion` 添加到文件顶部的导入语句中，使其如下所示：

```ts
import { engine, Entity, pointerEventsSystem, InputAction, Tween, EasingFunction, Transform } from '@dcl/sdk/ecs'
import { Vector3, Quaternion } from '@dcl/sdk/math'
```

{% hint style="info" %}
**💡 提示**：与其手动编辑导入语句，不如点击代码编辑器标记的错误，让它自动添加。
{% endhint %}

每一帧都会让牛油果再旋转一点。乘以 `dt` 可使运动平滑且不受帧率影响：无论玩家的机器运行得多快，牛油果都会以每秒 45 度的速度旋转。

由于 `speed` 是构造函数参数，它也会作为字段显示在 Creator Hub 的 Script 组件中。点击 Script 组件右上角的刷新图标即可查看，然后无需改动代码就能调整其值。

<img src="https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-8f1b521e1b68b5d9138dd1b60eeb40e4b13dbb0c%2Fscript-refresh-button.webp?alt=media" alt="刷新按钮" width="360">

每个实体都会为 **速度** 字段保存各自的值，因此多个物品可以共用同一个脚本，同时表现各异。试试看：按 Ctrl + C 和 Ctrl + V 复制牛油果，将副本移开，避免两者重叠，然后分别为它们设置不同的速度。现在，每个牛油果都会以自己的速度旋转。

脚本还能实现更多功能，例如公开可由其他智能物品触发的操作。请参阅 [Script 组件](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/shi-yong-dai-ma-kuo-zhan/script-component.md) 以了解全貌。

## 引用场景编辑器中的项目

Script 组件是为单个项目添加行为最简单的方式，但还有另一种方法：你可以在 `index.ts` 中通过名称获取你以可视化方式添加的任何项目，使用 `engine.getEntityOrNullByName()`。如果一段逻辑涉及多个项目，或者你希望将所有内容集中在一处，这种方法就很方便。使用实体树中显示的名称。 [实体树](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/scene-editor-essentials.md#the-entity-tree).

在此示例中，我们使用一个名为 **黄色箱子**的实体。你可以使用任意项目，只需准确填写实体树中显示的名称。

{% hint style="info" %}
**💡 提示**：你可以在实体树中右键单击实体，然后选择 **重命名** 来重命名实体。
{% endhint %}

```ts
export function main() {
	// 前面的 avocado2 代码
	// (...)

	const crate = engine.getEntityOrNullByName('Yellow Crate')

	if (crate) {
		pointerEventsSystem.onPointerDown(
			{
				entity: crate,
				opts: { button: InputAction.IA_POINTER, hoverText: 'Open' },
			},
			function () {
				console.log('CLICKED CRATE')
			}
		)
	}
}
```

此处 `engine.getEntityOrNullByName()` 会获取名为 *Yellow Crate*的实体引用。 `if (crate)` 检查可确保该实体确实存在于场景中；如果场景中没有该名称的实体， `crate` 就是 `null`。更多信息请参阅 [引用项目](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/shi-yong-dai-ma-kuo-zhan/reference-items.md) 。

{% hint style="info" %}
**💡 提示**：通过场景编辑器添加的所有实体，在 `main()` 运行时都已加载，因此可以在其中引用这些实体，也可以在由 `main()`.
{% endhint %}

## 更多教程

阅读 [编写场景代码](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/coding-scenes.md) ，以从高层次了解 Decentraland 场景的运行方式。

如需查看使用 SDK7 构建的示例，请参阅 [示例页面](https://docs.decentraland.org/creator/content-creator-zh/jiao-cheng-yu-shi-li/examples.md)，其中包含可重复使用的场景和代码库。

请参阅 **开发指南** 部分，了解有关向场景添加内容的更多说明。

## 与其他开发者交流

访问 [Decentraland Discord](https://dcl.gg/discord) 和 [Decentraland DAO Discord](https://discord.gg/bxHtcMxUs4) ，加入 Decentraland Discord 的 **创作者** 板块，畅聊各种可能性及其实现方式。

如需调试问题，请查看 [故障排除](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/tiao-shi/troubleshooting.md) 和 [调试](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/tiao-shi/debug-in-preview.md) 板块。安装了 [SDK 技能](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/vibe-coding.md) 的 AI 助手也是出色的调试伙伴：粘贴控制台中的错误消息，或描述哪里没有按预期运行，它通常就能找出代码中的问题。如果仍未找到解决方案，可以在 Decentraland 论坛的 [SDK 支持类别](https://forum.decentraland.org/c/support-sdk/11) 发帖求助。

## 3D 美术资源

出色的体验离不开精美的 3D 美术。如果你想亲自制作 3D 模型，请参阅 [3D 建模板块](https://docs.decentraland.org/creator/content-creator-zh/3d-jian-mo-yu-dong-hua/3d-models.md)。但如果你更想专注于编程或游戏设计，就不必自己创建资源！请参阅 [实用资源](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/useful-resources.md) ，了解可用于为场景寻找 3D 模型的资源库和 AI 工具。

## 发布场景

如果你拥有 Decentraland NAME、ETH ENS 名称或 LAND，或获得了拥有这些资产的用户授予的权限，就可以将场景上传到 Decentraland。请参阅 [发布](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/fa-bu/publishing.md).

## 其他实用信息

* [使用 AI 进行氛围编程](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/vibe-coding.md)
* [开发工作流](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/ru-men/dev-workflow.md)
* [编辑场景](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/ru-men/about-editor.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-sdk7/ti-yan-she-ji/design-games.md)
* [3D 建模](https://docs.decentraland.org/creator/content-creator-zh/3d-jian-mo-yu-dong-hua/3d-models.md)
* [场景限制](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/you-hua/scene-limitations.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/chang-jing-sdk7/ru-men/sdk-101.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.
