Installation
Download, install, and configure the GameTribe Unity SDK.
Requirements
Before installing the SDK, make sure your project meets these requirements:
| Requirement | Version |
|---|---|
| Unity | 2020.3 LTS or newer |
| Build Target | WebGL |
| .NET | Standard 2.1 or .NET 4.x |
| Scripting Backend | IL2CPP (recommended) |
Download the SDK
Download the latest version of the GameTribe Unity SDK:
- Go to the GameTribe dashboard and navigate to your game settings
- Download the
GameTribeSDK.unitypackage - The package includes all necessary scripts, plugins, and demo scenes
Import into Unity
Import the SDK package into your Unity project:
- Open your Unity project
- Go to
Assets → Import Package → Custom Package - Select the downloaded
GameTribeSDK.unitypackage - In the import dialog, ensure all items are selected
- Click
Import
Package Contents
After importing, you'll find these folders in your project:
bash
Assets/GameTribeSDK/├── Runtime/│ ├── Core/ # Main SDK classes│ ├── Events/ # Event tracking│ ├── Ads/ # Ad integration│ ├── Analytics/ # Analytics tracking│ ├── Network/ # HTTP client│ └── Plugins/WebGL/ # JavaScript bridge├── Editor/ # Editor tools└── Demo/ # Example scenes
Configuration
Create Platform Config
Create a configuration asset to store your API credentials:
- Right-click in your Project window
- Select
Create → GameTribe → Platform Config - Name it
GameTribePlatformConfig
Configuration Settings
Configure the following settings in your Platform Config:
| Setting | Description | Default |
|---|---|---|
| API Key | Your game's SDK API key | Required |
| Game ID | Unique game identifier | Required |
| API Base URL | Backend server URL | Production URL |
| Event Batch Size | Events before auto-send | 10 |
| Event Batch Interval | Seconds before auto-send | 30 |
| Ad Cooldown Seconds | Time between interstitial ads | 180 |
| Debug Mode | Enable debug logging | false |
| Mock API Responses | Use mock data for testing | false |
API Credentials
Get your API credentials from the GameTribe dashboard:
- Log in to the GameTribe dashboard
- Navigate to your game's settings
- Copy the Game ID and API Key
- Paste them into your Platform Config asset
Keep your API Key secure. Never commit it to public repositories.
Scene Setup
Add the SDK manager to your scene:
- Create an empty GameObject named
GameTribeSDK - Add the
PlatformSDKcomponent to it - Assign your Platform Config asset to the
Configfield - The SDK will automatically initialize when the scene loads
The PlatformSDK component uses the singleton pattern. You only need one instance in your game, and it will persist across scene loads.
WebGL Build Settings
Configure your project for WebGL builds:
- Go to
File → Build Settings - Select WebGL as your target platform
- Click
Switch Platform - Open
Player Settings
Recommended Settings
| Setting | Recommended Value |
|---|---|
| Compression Format | Gzip or Brotli |
| Exception Support | Explicitly Thrown Exceptions Only |
| Memory Size | 256 MB (adjust based on game) |
| Run in Background | Enabled |
| WebGL Template | Minimal or Custom |
Verify Installation
Run the demo scene to verify the SDK is installed correctly:
- Open
Assets/GameTribeSDK/Demo/DemoScene - Enter Play mode in the Unity Editor
- Check the Console for SDK initialization messages
- You should see "SDK Ready!" when initialization is complete
In the editor, the SDK uses mock responses by default so you can test without a backend connection. Set
mockAPIResponses = false in your config to test with the real backend.