Integrate
Apps in Toss mini-apps are web-basedthey work. To turn a Unity game into a mini-app, you need to build the project as a WebGL buildWhen built as WebGL, the Unity game is converted into a form that can run in a browser, and it can be provided as a mini-app in the Apps in Toss environment.
The one provided exclusively for Unity Apps in Toss Unity packageIf you install it, you can handle everything from WebGL build to mini-app packaging at once, without configuring a Vite project or implementing a JS Bridge.
Why you should use the Apps in Toss Unity SDK
Using the Apps in Toss Unity package gives you the following benefits.
Short porting time: You can easily and quickly port a game developed in Unity to an Apps in Toss mini-app without a separate Vite project setup or JS Bridge implementation.
Improved stability and user experience: By reducing loading time to about one-fifth, you can improve mini-app stability and provide users with a better experience.
Check more performance metrics: You can check more diverse game performance metrics such as crash rate, loading time, and FPS.
Built-in loading screen: The loading screen is included by default in the SDK, so partners do not need to configure one separately.
What is SDK integration?
SDK integration is a method that automatically handles the processes needed for Apps in Toss integration inside Unity.
For WebView SDK integration, JS Bridgeis included by default.
In Unity Apps in Toss APIcan be called directly with C# code.
From WebGL build to
.aitfile generation, everything is automated at once.Game performance metrics such as crash rate, loading time, and FPS are collected automatically.
If you are developing a mini-app in Unity, we recommend proceeding based on the Unity SDK provided by Apps in Toss.
SDK installation
Method 1: Package Manager (recommended)
In the Unity Editor,
Window>Package Manageropen it.top left
+click the button andAdd package from git URL...select it.Enter the Git URL and Installpress it to install.
Method 2: Directly edit manifest.json
of the project Packages/manifest.json You can also add it directly to the file:
Supported Unity versions
Minimum version: Unity 2021.3
Recommended version: Unity 6 or later
Supports all versions from Unity 2021.3 onward.
Checking installation completion
If installation completes successfully:
In the Package Manager list, AppsInToss SDKis displayed.
At the top of the Unity menu, AIT a new item is added.
Packages/Apps In Toss SDK/Runtime/SDKunder the pathAIT.*.csfiles are created.
Package components
The Apps in Toss Unity package provides both the C# API Layerand JavaScript Bridge (.jslib) to let you use the Apps in Toss SDK in a WebGL environment.
C# API Wrapper
This is an API provided so you can directly call Apps in Toss functions from Unity C# code.
It wraps the Apps in Toss API as C# methods for convenient use.
Internally,
DllImport("__Internal")it links to JS functions during the WebGL build.You can integrate Apps in Toss using only C# code, without any separate JavaScript.
JavaScript Bridge (.jslib)
.jslib The .jslib file serves as a bridge connecting C# and JavaScript in the Unity WebGL environment.
JS functions called from C# are defined in this file.
The logic that actually communicates with the Apps in Toss WebView SDK is also handled here.
It also supports JS → C# calls, allowing a two-way messaging structure.
AIT Menu
When the Apps in Toss Unity package is installed, the AIT menu is added to the top of the Unity Editor. In this menu, you can use most of the functions needed for the integration process, such as WebGL build, packaging, and running the test server.
Dev Server
Runs a development test server. Mock bridge is enabled, so you can test in a local browser.
Production Server
Runs a local server with production settings. You can perform tests similar to the actual deployment environment.
Build & Package
WebGL build + .ait Packaging runs at once. This is the option used most frequently.
Publish
.ait Upload the file to the Apps in Toss console. A deployment key must be registered in Configuration.
Clean
Deletes previous build artifacts.
Open Build Output
Opens the folder where the build artifacts are saved.
Configuration
Sets build options related to Apps in Toss mini-app integration.
Debug
You can check logs or inspect the internal state.
Configuration
After installing the SDK, in the Unity Editor menu AIT > Configurationclick it to open the settings panel.
Required settings
App ID
Registered in the Apps in Toss console appNamemust be the same
App icon URL
Image URL displayed as the mini-app icon (required)
Display name
App name displayed on the loading screen
Primary color
Brand color (used for progress bars, etc.)
For detailed settings for each build option, please refer to the build profile documentation.
First build
1. Check the settings
AIT>ConfigurationCheck the settings in the menu.App icon URLMake sure it is entered (required).
2. Run the development server
During development, use Dev Server mode:
AIT>Dev Server>Start ServerClick the menu item.The Unity WebGL build runs automatically.
After the build completes, the local development server starts.
It opens automatically in the browser, or you can access it via the URL shown in the console.
3. Production build
To create a deployment build:
AIT>Build & PackageClick the menu item.After the build completes
ait-build/dist/You can check the results in the folder.
4. Deployment
To deploy to the Apps in Toss platform:
AIT>PublishClick the menu item.The deployment key must be set (in Configuration).
Using the SDK
If you install the Apps in Toss Unity SDK, you can directly AIT.* call the APIs from C# code. You can use Apps in Toss features with only Unity code, without writing a JS Bridge yourself.
Most Apps in Toss APIs are async:
If successful, a result model specific to the API is returned.
If it fails,
AITExceptionan exception may occur, so exception handling is needed.
You can find the full list of available AIT APIs in the Apps in Toss SDK reference. The WebView SDK's getDeviceIdis called in the Unity SDK AIT.GetDeviceId()as GetDeviceId
Please refer to the API usage patterns document for detailed usage patterns.
Example
Test
The Apps in Toss AIT API does not work in a regular browser environment. Features are available only in the Apps in Toss runtime environment.
There are two testable environments:
1. Test in the sandbox app
This is a test app provided to verify features during development. You can run a Unity WebGL build and check whether the AIT API connects properly.
Download the sandbox app
2. Test after uploading the .ait file
In the AIT menu
Build & Packageas a.aitgenerate the file.Apps in Toss consoleUpload it to
Run the mini-app using the QR code.
For details, please refer to the Testing in the Toss app document.
Last updated
Was this helpful?