Skip to main content

Requirements

  • Unity 2019.4 (LTS) or later
  • .NET Standard 2.1 / .NET Framework

Dependencies

The SDK requires the following Unity packages:

Installation

Step 1: Add Dependencies

Add the required dependencies to your Packages/manifest.json:
{
  "dependencies": {
    "com.unity.nuget.newtonsoft-json": "3.0.2",
    "com.unity.test-framework": "1.1.33"
  }
}

Step 2: Add the SDK

Download the SDK from the GitHub repository and copy the src/Org.OpenAPITools folder into your Unity project’s Assets folder. Your project structure should look like:
Assets/
├── Org.OpenAPITools/
│   ├── Api/
│   ├── Client/
│   ├── Model/
│   └── TogachaClient.cs
└── ...

Step 3: Import Namespaces

Add the following using statements to your scripts:
using Togacha;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

Verify Installation

Create a simple test script to verify the SDK is working:
using UnityEngine;
using Togacha;

public class TogachaTest : MonoBehaviour
{
    async void Start()
    {
        var client = new TogachaClient(
            "https://togacha.com",
            "tgc_public_your_api_key"
        );

        Debug.Log("Togacha SDK initialized successfully!");
    }
}

Next Steps