> 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/xiang-mu-lei-xing/workspaces.md).

# 工作区

同时运行多个 DCL 项目

将多个 Decentraland 项目归入一个工作区，即可在预览中同时运行它们。你可以同时运行多个相邻场景，查看它们如何衔接；也可以同时运行多个 [智能可穿戴设备](/creator/content-creator-zh/chang-jing-sdk7/xiang-mu-lei-xing/smart-wearables.md) ，查看它们如何彼此交互，以及如何与不同场景互动。

在工作区中运行多个项目，能提供更全面的测试方式，确保不同内容可以协同运行。工作区是一项调试功能，不会影响已发布场景中的体验。

{% hint style="warning" %}
**📔 注意**： **Creator Hub** 目前尚不支持工作区。
{% endhint %}

## 创建工作区

1. 下载 [Goerli Plaza](https://github.com/decentraland/sdk7-goerli-plaza) 代码仓库。
2. 新建一个单独的顶层文件夹来存放工作区。
3. 从 Goerli Plaza 代码仓库中，将以下文件复制到工作区：
   * `dcl-workspace.json`
   * `package.json`
   * `.gitignore`
4. 在此文件夹中，为要使用的每个项目各创建一个位于根目录的文件夹。你可以将包含场景或智能可穿戴设备的现有文件夹拖入其中。若要新建文件夹，请在每个文件夹中运行 `npx @dcl/sdk-commands init` ，以创建 Decentraland 项目。

   > 注意：确保各个场景的地块互不重叠。
5. 在工作区文件夹的根目录中运行以下命令，以创建所需文件：

   `npm run update-parcels && npm run sync && npm run test && npm run format`

打开 `dcl-workspace.json` 文件，检查其中列出的路径，即可确认哪些项目属于此工作区。路径位于 `folders` 数组中。

## 运行工作区

在工作区根目录中运行 `npm run start` 。这会同时运行所有项目，并在同一个预览窗口中显示。此预览的行为与预览单个场景时相同。

工作区中的智能可穿戴设备可在背包中找到并试穿。

## 添加项目

创建工作区后，你可以手动编辑 `dcl-workspace.json` 文件来添加其他项目。在 `folders` 数组中添加一项，填写要添加文件夹的相对路径。例如： `my-other-example`.

你也可以使用绝对路径，添加位于工作区文件夹之外的项目。

{% hint style="warning" %}
**📔 注意**：该文件夹必须已包含通过 `npx @dcl/sdk-commands init`初始化的 Decentraland 项目，不能是空文件夹。
{% endhint %}

若要添加或移除项目，请编辑 `dcl-workspace.json` 文件，在 `folders` 数组中填写工作区内各个项目的相对路径。

```json
{
	"folders": [
		{
			"path": "example-scene"
		},
		{
			"path": "example-scene2"
		}
	]
}
```


---

# 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/xiang-mu-lei-xing/workspaces.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.
