---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.0
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/construct-3/remote-config.md
  - https://yandex.com/dev/games/doc/ru/sdk/construct-3/remote-config.md
  - https://yandex.com/dev/games/doc/tr/sdk/construct-3/remote-config.md
  - https://yandex.com/dev/games/doc/zh/sdk/construct-3/remote-config.md
  - href: https://yandex.com/dev/games/doc/zh/sdk/construct-3/remote-config.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com/dev/games/doc/zh/llms.txt?revision=r21993288
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/zh/llms.txt?revision=r21993288

# 远程配置

<!-- source: zh/_includes/script-common.md -->
<!-- source: zh/_includes/script/index-js.md -->

<!-- endsource: zh/_includes/script/index-js.md -->

<!-- source: zh/_includes/script/requirements-js.md -->

<!-- endsource: zh/_includes/script/requirements-js.md -->

<!-- source: zh/_includes/script/image-modal-js.md -->

<!-- endsource: zh/_includes/script/image-modal-js.md -->
<!-- endsource: zh/_includes/script-common.md -->

要获取远程配置标志（Remote Config），请结合使用 **Fetch remote config** 动作以及 **Player info is successfully fetched** 和 **Failure to fetch remote config**。 建议在游戏启动时请求一次标志。

要从远程配置中获取值，请使用 **Flag** 表达式。

## 本地配置 {#local}

<!-- source: zh/_includes/sdk/common-with-plugins.md -->
{% note tip %}

始终在游戏代码中添加本地标志配置，以防无法从服务器获取远程配置（例如，由于互联网连接问题）。

{% endnote %}
<!-- endsource: zh/_includes/sdk/common-with-plugins.md -->

为此，请使用 **Set key default value** 动作。

## 客户端参数 {#client}

要描述客户端参数，请使用 **Set client feature** 动作。 它们将在请求远程配置时被传递。

## 远程配置使用示例 {#example}

![Construct 3 截图：使用 YandexGamesSDK 插件配置远程配置的界面。 一个三列表格（第三列的每个单元格中都有"+ 添加动作"和"+ 添加..."按钮），共三行。 第1行 — "系统"设置图标，"启动布局已完成"，"Yan... | 远程配置。 为键"someProp"设置标准值"someValue" \n Yan... | 远程配置：为客户端特性"featureKey"设置值"featureValue" \n Yan... | 请求远程配置。" 第2行 — "YandexGames..."，"远程配置已加载"，"系... | 将 someProp 设置为 YandexGamesSDK.标志("someKey") 的值"。 第3行 — "YandexGames..."，"远程配置加载错误"，空行。](../../_images/construct-3/remote-config/example.webp)

---


<!-- source: zh/_includes/sdk/button-git.md -->
<a href="https://github.com/yandex-games-plugins/construct3">
  <span class="button">存储库</span>
</a>
<!-- endsource: zh/_includes/sdk/button-git.md -->
