> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-en/unity/sample-code.md).

# Sample Code

You can take a quick look at the features provided by the Apps in Toss Unity SDK. Click each item to see detailed guides and sample code.

\[View Unity SDK GitHub ↗]\(<https://github.com/toss/apps-in-toss-unity-sdk/>)

### Getting Started Guide

| Feature                                                           | Description                                                                            |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [Get started](/documentation/api-and-sdk-en/unity/integration.md) | You can install the SDK and proceed all the way to building.                           |
| API usage patterns                                                | You can learn how to handle async processing, errors, and set up the test environment. |

### API reference

| Feature              | Description                                                                                                  |
| -------------------- | ------------------------------------------------------------------------------------------------------------ |
| Authentication       | Users can easily log in with their Toss account without separate sign-up.                                    |
| Navigation           | You can configure the title and back button area at the top of the screen.                                   |
| Safe Area            | Check the screen inset values so they aren't obscured by notches or rounded corners.                         |
| System Information   | You can check device ID, platform, app version, network status, and more.                                    |
| Permission settings  | You can request and check device permissions such as camera and location.                                    |
| Location Information | You can get the current location or track location in real time.                                             |
| Media                | You can take photos with the camera or import photos from the album.                                         |
| Clipboard            | You can retrieve copied text or copy text to the clipboard.                                                  |
| Contacts             | Get the user's contact list.                                                                                 |
| Storage              | You can store user information on the device.                                                                |
| Game Leaderboard     | When play ends, it registers the score and shows the rankings. Competition makes players want to play again. |
| Sharing              | Share game results or invite links so recipients can open them directly in the Toss app.                     |
| Other APIs           | It covers user identifiers, promotion rewards, app review requests, and more.                                |

### Build

| Feature             | Description                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------- |
| Build profile       | You can configure build settings optimized for each stage of development, testing, and deployment. |
| Build Process       | You can review the entire process from initialization to WebGL build and packaging.                |
| Build customization | You can customize the build with index.html, npm packages, Vite plugins, and more.                 |

### Screens & Events

| Feature                      | Description                                                                |
| ---------------------------- | -------------------------------------------------------------------------- |
| Loading screen customization | You can customize the loading screen with custom HTML and JavaScript.      |
| Screen Visibility Handling   | You can handle audio and game state when the app goes into the background. |

### Analytics & Monitoring

| Feature            | Description                                                                                                        |
| ------------------ | ------------------------------------------------------------------------------------------------------------------ |
| SDK event logging  | Records what users did in the game. Essential for improving the game through data analysis, A/B testing, and more. |
| Sentry integration | Integrate Sentry to automatically track and monitor errors.                                                        |

### Monetization

| Feature          | Description                                                             |
| ---------------- | ----------------------------------------------------------------------- |
| In-app Ads       | You can add full-screen ads or rewarded ads.                            |
| In-app Purchases | You can generate revenue with one-time purchase products such as items. |

### Troubleshooting

| Feature                          | Description                                                                      |
| -------------------------------- | -------------------------------------------------------------------------------- |
| Troubleshooting                  | You can check common issues and solutions when using the SDK.                    |
| Debugging and Exception Handling | You can learn how to debug and handle exceptions in the Unity WebGL environment. |


---

# 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://developers-apps-in-toss.toss.im/documentation/api-and-sdk-en/unity/sample-code.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.
