---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/defold/game-start.md
  - https://yandex.com/dev/games/doc/hi/sdk/defold/game-start.md
  - https://yandex.com/dev/games/doc/ko/sdk/defold/game-start.md
  - https://yandex.com/dev/games/doc/ru/sdk/defold/game-start.md
  - https://yandex.com/dev/games/doc/tr/sdk/defold/game-start.md
  - https://yandex.com/dev/games/doc/vi/sdk/defold/game-start.md
  - https://yandex.com/dev/games/doc/zh/sdk/defold/game-start.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/zh/llms.txt

# 游戏开始

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

`ysdk.features.loading_api.ready()` 方法用于指示游戏已经加载完所有资源，并且可以与用户进行交互。

```lua showLineNumbers
function init(self)
    ysdk.features.loading_api.ready()
end
```

Yandex 游戏面向全球用户，因此收集统计信息对于提升加载速度和游戏可用性非常重要。例如，根据这些数据，我们会决定在什么地方部署新的数据中心。

此外，该方法将来还可以用于增加新功能，从而更好地利用游戏加载时的时间，例如可以增加：

- 一个额外的广告位，为开发者带来更多收益；
- 所有游戏共有的加载界面、游戏截图或者评论，从而提升游戏吸引力。

使用该方法时，请确保在调用时：

- 所有元素都已准备好与玩家进行交互；
- 没有加载界面显示。

---


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