> 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/shi-shi-yun-ying/server-data.md).

# 服务器数据

查看和编辑你的场景的多人服务器保存的实时数据。

使用某个 [多人服务器](/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.md) 可以在服务器上持久保存数据：排行榜、玩家进度、环境变化，如门已打开或物品已放置，等等。这些数据会被更新 **实时** 当玩家与你已发布的场景互动时。

你可以通过网页界面查看所有这些数据，而且还可以 **直接在那里修改它**。你所做的任何编辑都会立即生效到实时场景中，无需重新发布。这包括：

* **场景数据**：所有玩家共享的值，例如排行榜或门的状态。
* **玩家数据**：为单个玩家存储的值，例如他们的进度或偏好。
* **环境变量**：仅服务器可以读取的配置值和密钥。

## 访问存储界面

你可以直接在以下地址打开存储界面 [decentraland.org/storage](https://decentraland.org/storage).

你也可以从 Creator Hub 进入：

1. 打开 **管理** Creator Hub 中的该部分。
2. 点击 **三个点** 位于你已发布内容的地点旁边。
3. 选择 **查看存储**.

<img src="https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-7b158df7503886c483d7dcf8179d376a6e334ace%2Fview-storage.png?alt=media" alt="Creator Hub 中的“查看存储”选项" width="400">

存储界面会显示你已在其中发布场景或拥有操作员权限的所有 World 和 LAND 位置列表。打开某个场景即可查看其数据，数据按三个标签页组织： **场景**, **玩家**、以及 **环境**.

{% hint style="info" %}
**💡 提示**：这类数据仅存在于使用多人服务器并通过以下方式存储数据的场景中： `存储` API。参见 [多人服务器](/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.md) 了解如何进行设置。
{% endhint %}

## 场景数据

该 **场景** 标签页列出了所有在玩家之间共享的已存储变量，例如排行榜或当前环境状态。

![Scene data tab](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-cc204e102da9c2e63419b91f818f22a579e55ebf%2Fscene-data.png?alt=media\&token=c8cc218c-e4ea-4689-ba83-387115558db1)

当玩家与你的场景互动时，此列表中的值会实时更新。你也可以通过点击铅笔或垃圾桶图标来编辑或移除这些变量中的任意一个。运行中的场景会接收这些更改，因此这是一种无需重新发布即可调整实时值的便捷方式，例如重置排行榜。

## 玩家数据

该 **玩家** 标签页列出了所有在你的服务器上存储了数据的玩家。你可以通过钱包地址或姓名搜索玩家，然后查看其所有关联数据。

与场景数据一样，你可以通过点击铅笔或垃圾桶图标来编辑或移除任意值。

这对支持工作尤其有用：如果某个玩家报告你场景中的问题，你可以查找该玩家并检查其存储数据，以了解情况。例如，如果他们陷入了不良状态，比如旧版本场景中的数据相互矛盾，你可以编辑或清除其记录，将其恢复到稳定状态，而无需重新部署任何内容。

## 环境变量

该 **环境** 标签页列出了为你的场景定义的所有环境变量。这些是只有服务器才能读取的配置值，因此它们非常适合用于 **密钥** 诸如私钥或奖励领取代码之类的敏感信息：这些值不会经过玩家的设备，也不会出现在你场景的已发布代码中。

![Environment variables tab](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-3661fea25e77812e3b8eb0c4ec56a5ee808f9ff1%2Fenvironment-variables.png?alt=media\&token=b8c1a2c0-907d-402a-9e07-303bbf8732b2)

在此标签页中，你可以添加新变量，或使用铅笔或垃圾桶图标覆盖和删除现有变量。请注意，你不能 *读取* 变量的当前值；这是有意为之，以保护敏感数据。你只能替换或删除它。

环境变量也非常适合用于功能开关或游戏参数，例如比赛时长或最大玩家数，你可能希望在不重新发布的情况下在实时场景中调整它们。

## 了解更多

要了解如何在场景代码中读取和写入这些数据，包括随着时间推移更改存储数据结构的最佳实践，请参见 [多人服务器](/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.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-bian-ji-qi/shi-shi-yun-ying/server-data.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.
