---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/defold/params.md
  - https://yandex.com/dev/games/doc/hi/sdk/defold/params.md
  - https://yandex.com/dev/games/doc/ko/sdk/defold/params.md
  - https://yandex.com/dev/games/doc/ru/sdk/defold/params.md
  - https://yandex.com/dev/games/doc/tr/sdk/defold/params.md
  - https://yandex.com/dev/games/doc/vi/sdk/defold/params.md
  - https://yandex.com/dev/games/doc/zh/sdk/defold/params.md
  - href: zh/sdk/defold/params.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/zh/llms.txt

# 其他 SDK 对象和参数

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

## screen 对象 {#screen}

包含用于屏幕操作的设置：

```lua showLineNumbers
{
    fullscreen: {
        status: function(): "on"|"off",
        request: function(): nil,
        exit: function(): nil
    },
    orientation: {
        get: function(): "portrait"|"landscape",
        set: function(value: "portrait"|"landscape")
    }
}
```

{% note alert %}

Yandex Games 可以全屏模式自动启动，但许多浏览器不支持在没有用户命令的情况下切换模式。

Yandex Games 屏幕的左上角有一个用于切换到全屏模式的按钮，因此可以使用 `screen.fullscreen` 对象参数直接处理游戏中的按钮。

{% endnote %}

## clipboard 对象 {#clipboard}

用于通过 `ysdk.clipboard.write_text(text: string)` 方法向剪贴板中写入一行。

## device_info 对象 {#device-info}

用于通过 `ysdk.device_info()` 方法获取关于用户设备的信息。

```lua showLineNumbers
{
    type: "mobile"|"desktop"|"tablet"|"tv",
    isMobile: boolean,
    isDesktop: boolean,
    isTablet: boolean,
    isTV: boolean,
}
```

---


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