> For the complete documentation index, see [llms.txt](/llms.txt)


# Samples and reference

Find demos, samples, and detailed references for what you want to build or learn.



This completes the adventure game tutorial. The resources below help you find implementations for a feature or look up API parameters when you need them during development.

## Review the tutorial's settings and concepts

- [Settings reference](): names and values used in each chapter. From chapter 7, Forest exploration rewards 15 coins.
- [Game data and request flow](): review master data, user data, and the roles of Unity and GS2.

## Tutorial code and templates

Download chapter 1's <a href="/samples/adventure/en/AdventureLogin.cs" download>login C# script</a> and <a href="/samples/adventure/en/01-account.yaml" download>Account template</a>, or use the table below for later chapters. Replace C# files with the same name as directed in each chapter. Chapter 4 uses the code from chapter 3.

| Chapter | Studio view code | SDK C# code | SDK server settings |
| --- | --- | --- | --- |
| Chapter 2 | <a href="/samples/adventure/en/02/AdventureStudioView.cs" download>AdventureStudioView.cs</a> | <a href="/samples/adventure/en/02/AdventurePlay.cs" download>AdventurePlay.cs</a> | <a href="/samples/adventure/en/02/adventure-game.yaml" download>adventure-game.yaml</a> |
| Chapter 3 | <a href="/samples/adventure/en/03/AdventureStudioView.cs" download>AdventureStudioView.cs</a> | <a href="/samples/adventure/en/03/AdventurePlay.cs" download>AdventurePlay.cs</a><br><a href="/samples/adventure/en/03/AdventurePlayer.cs" download>AdventurePlayer.cs</a> | <a href="/samples/adventure/en/03/adventure-game.yaml" download>adventure-game.yaml</a> |
| Chapter 5 | <a href="/samples/adventure/en/05/AdventureStudioView.cs" download>AdventureStudioView.cs</a> | <a href="/samples/adventure/en/05/AdventurePlay.cs" download>AdventurePlay.cs</a><br><a href="/samples/adventure/en/05/AdventurePlayer.cs" download>AdventurePlayer.cs</a> | <a href="/samples/adventure/en/05/adventure-game.yaml" download>adventure-game.yaml</a> |
| Chapter 6 | <a href="/samples/adventure/en/06/AdventureStudioView.cs" download>AdventureStudioView.cs</a> | <a href="/samples/adventure/en/06/AdventurePlay.cs" download>AdventurePlay.cs</a><br><a href="/samples/adventure/en/06/AdventurePlayer.cs" download>AdventurePlayer.cs</a> | <a href="/samples/adventure/en/06/adventure-game.yaml" download>adventure-game.yaml</a> |
| Chapter 7 | Use chapter 6's code | Use chapter 6's code | <a href="/samples/adventure/en/07/adventure-game.yaml" download>adventure-game.yaml</a> |
| Chapter 8 | <a href="/samples/adventure/en/08/AdventureStudioView.cs" download>AdventureStudioView.cs</a> | <a href="/samples/adventure/en/08/AdventurePlay.cs" download>AdventurePlay.cs</a> | Use chapter 7's settings |


## Find a feature

| Feature | Tutorial | Detailed reference |
| ------------------------------ | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| Account creation and login       | [Chapter 1]()   | <a href='' target="_blank" rel="noopener">Account API (new tab)</a>                     |
| Quests and completion rewards               | [Chapter 3]() | <a href='' target="_blank" rel="noopener">Quest API (new tab)</a>                      |
| Read coin balances               | [Chapter 3]()  | <a href='' target="_blank" rel="noopener">Money2 API (new tab)</a>                    |
| Spend stamina                 | [Chapter 5]() | <a href='' target="_blank" rel="noopener">Stamina API (new tab)</a>                  |
| Buy stamina with coins | [Chapter 6]()    | <a href='' target="_blank" rel="noopener">Transaction settings (new tab)</a>                 |
| Change rewards and add quests         | [Chapter 7]()  | <a href='' target="_blank" rel="noopener">Master data management (new tab)</a>                        |
| Synchronize characters             | [Realtime chapter]()    | <a href='' target="_blank" rel="noopener">Synchronization tutorial (new tab)</a> |

## Reduce requests at startup

As your screens use more data, you can fetch player data in one batch with `LoadUserDataAsync` after login. The results enter the SDK cache and are used by subsequent data reads.

```csharp
await Gs2.LoadUserDataAsync(login);
```

Make this call after login, before individual screens begin fetching data. In the SDK tutorial, this is in `AdventureLogin.cs`, after `Gs2.LoginAsync(...)` returns and just before `Session = login;`. Later changes reach the screen through handlers or subscriptions such as `SubscribeWithInitialCallAsync`.

Batch loading reduces the requests needed for individual reads. It is not an additional requirement for resuming with the same player. See the <a href="https://gs2.hatenablog.com/entry/2026/11/11/113825" target="_blank" rel="noopener">GS2 blog introduction (Japanese, new tab)</a> for details.

## Explore demos and samples

- <a href='' target="_blank" rel="noopener">Showroom (new tab)</a>: try GS2 features in your browser.
- <a href='' target="_blank" rel="noopener">Sample code (new tab)</a>: find complete game examples and feature-specific samples.
- <a href='' target="_blank" rel="noopener">UIKit tutorial (new tab)</a>: learn to build Unity screens with UIKit.
- <a href="https://gs2.io/studio.html" target="_blank" rel="noopener">GS2 Studio (new tab)</a>: learn about Studio and how to get started.

## When something does not work

[Troubleshooting]() lists common symptoms and where to investigate. Start with the entry closest to your situation. For API parameters and errors, use the service references in the table above.




- [Game data and request flow](/en/get_start/adventure/resources/data-flow/)
  
- [Game settings reference](/en/get_start/adventure/resources/game-settings/)
  
- [Troubleshooting by symptom](/en/get_start/adventure/resources/troubleshooting/)
  
