> 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 get an overview of the features provided by the Apps in Toss Unity SDK. Click each item to view detailed guides and sample code.

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

### Getting Started Guide

| Feature                                                               | Description                                                                                   |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Getting 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, handle errors, and set up the test environment. |

### API Reference

| Feature              | Description                                                                                                                       |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Authentication       | Users can log in easily with their Toss account without signing up separately.                                                    |
| Navigation           | You can set the title and back button area at the top of the screen.                                                              |
| Safe Area            | Check the screen padding values so they are not hidden by the notch or rounded corners.                                           |
| System Information   | You can check the 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 keep text copied to the clipboard.                                                                |
| Contacts             | Fetch 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. It adds a competitive element that makes users want to play again. |
| Share                | You can share game results or invitation links so recipients can open them directly in the Toss app.                              |
| Other APIs           | It covers user identification keys, promotion rewards, app review requests, and more.                                             |

### Build

| Feature             | Description                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------- |
| Build Profiles      | 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.                 |

### Screen & Events

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

### Analytics & Monitoring

| Feature            | Description                                                                                                   |
| ------------------ | ------------------------------------------------------------------------------------------------------------- |
| SDK event logging  | Record what users do in the game. It's essential for game improvements such as data analysis and A/B testing. |
| Sentry integration | You can integrate Sentry to automatically track and monitor errors.                                           |

### Monetization

| Feature          | Description                                                                     |
| ---------------- | ------------------------------------------------------------------------------- |
| In-app Ads       | You can add full-screen ads or reward ads that give users a reward when viewed. |
| In-app Purchases | You can generate revenue with items sold one at a time, like in-game items.     |

### Troubleshooting

| Feature                          | Description                                                                       |
| -------------------------------- | --------------------------------------------------------------------------------- |
| Troubleshooting                  | You can check common issues that occur while using the SDK and how to solve them. |
| Debugging and Exception Handling | You can check 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.
