---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.4
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/defold/shortcut.md
  - https://yandex.com/dev/games/doc/hi/sdk/defold/shortcut.md
  - https://yandex.com/dev/games/doc/ko/sdk/defold/shortcut.md
  - https://yandex.com/dev/games/doc/ru/sdk/defold/shortcut.md
  - https://yandex.com/dev/games/doc/tr/sdk/defold/shortcut.md
  - https://yandex.com/dev/games/doc/vi/sdk/defold/shortcut.md
  - https://yandex.com/dev/games/doc/zh/sdk/defold/shortcut.md
  - href: ko/sdk/defold/shortcut.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/ko/llms.txt

# 바탕화면 바로 가기

기본 대화 상자를 사용하여 사용자에게 게임 링크를 바탕화면 바로 가기로 추가하도록 제공할 수 있습니다.


대화 상자를 표시하기 전에 해당 옵션을 사용할 수 있는지 확인하세요.


## 바로 가기 추가가 가능한지 확인하기 {#can-add-shortcut}

옵션의 사용 가능 여부는 플랫폼, 내부 브라우저 규칙, [Yandex Games](https://yandex.com/games/) 제한에 따라 달라집니다. 바로가기를 추가할 수 있는지 확인하려면 `ysdk.shortcut.can_show_prompt()` 메서드를 사용합니다:

```lua
ysdk.shortcut.can_show_prompt(function (self, can_show)
  if can_show then
    -- 여기에 바로 가기 추가 버튼을 표시할 수 있습니다.
  end
end)
```

## 대화 상자 열기 {#dialog-add-shortcut}

확인 후 게임에서 버튼(또는 다른 인터페이스 요소)을 클릭하면 바로가기를 추가하기 위한 대화 상자를 호출하는 버튼(또는 다른 인터페이스 요소)을 표시할 수 있습니다. 대화 상자를 호출하려면 `ysdk.shortcut.show_prompt()` 메서드를 사용합니다:

```lua
ysdk.shortcut.show_prompt(function (self, accepted)
  if accepted then
    -- 여기에서 바로 가기 추가에 대한 보상을 부여할 수 있습니다.
  end
end)
```

메서드를 처음 호출하면 [Yandex Games](https://yandex.com/games/) 카탈로그에 대한 바로 가기가 만들어집니다. 이미 존재하는 경우 게임 링크가 포함된 바로 가기가 생성됩니다.

---


<!-- source: ko/_includes/button-git-defold.md -->
<a href="https://github.com/yandex-games-plugins/defold">
  <span class="button">저장소</span>
</a>
<!-- endsource: ko/_includes/button-git-defold.md -->
