> 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-wei/server-data.md).

# 服务器数据

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

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

您可以通过网页 UI 查看所有这些数据，也可以 **直接在这里更改它**。您所做的任何编辑都会立即作用于线上场景，无需重新发布。这包括：

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

## 访问存储 UI

您可以直接在以下地址打开存储 UI： [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">

存储 UI 会显示您已发布场景或拥有操作员权限的所有 Worlds 和 LAND 位置列表。打开某个场景即可查看其数据，这些数据按三个选项卡组织： **场景**, **玩家**，以及 **环境**.

{% hint style="info" %}
**💡 提示**：此数据仅存在于使用多人服务器并通过 `存储` API 存储数据的场景中。请参阅 [多人服务器](/creator/content-creator-zh/chang-jing-sdk7/wang-luo/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)

此列表中的值会随着玩家与您的场景交互而实时更新。您也可以通过点击铅笔或垃圾桶图标编辑或移除这些变量中的任意一个。更改会被正在运行的场景接收，因此这是在不重新发布的情况下调整实时值的便捷方式，例如重置排行榜。

## 玩家数据

该 **玩家** 选项卡列出所有在您的服务器上存有数据的玩家。您可以通过钱包地址或名称搜索玩家，然后查看其所有相关数据。

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

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

## 环境变量

该 **环境** 选项卡列出了为您的场景定义的所有环境变量。这些是只有服务器才能读取的配置值，因此它们非常适合用于 **机密信息** ，例如私钥或奖励领取代码：这些值绝不会经过玩家的机器，也不会出现在您场景的已发布代码中。

![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)

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

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

## 了解更多

要了解如何从场景代码中读写这些数据，包括随着时间推移更改存储数据结构的最佳实践，请参阅 [多人服务器](/creator/content-creator-zh/chang-jing-sdk7/wang-luo/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/shi-shi-yun-wei/server-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
