Requirements
- Unity 6000 or later
- Xcode (for iOS builds)
- Cocoapods (for iOS builds)
- Android SDK (for Android builds)
Getting the SDK
Importing to Unity
Drag and drop the downloaded
.unitypackage file into your Unity editor. Make sure all folders are selected when Unity asks you to choose the folders to be imported.Creating a Playtolia Game Object
Add the
PlaytoliaGameObject to your initial scene to initialize Playtolia components.Quick setup: Drag the prefab at Assets/PlaytoliaSDK/Prefabs/PlaytoliaGameObject.prefab into your main scene.Manual setup: Create an empty GameObject at the root of your scene, then add the PlaytoliaGameObject script as a component.Configure Playtolia
Navigate to Edit > Project Settings > Playtolia Settings.Game ID: Your unique game identifier from the Playtolia dashboard. Required for all API calls.Logging Level: Controls SDK logging verbosity — None, Error, Warning, Info, or Debug.Authentication: Enable to use login/logout features. Toggle “Authentication Required” for automatic login prompts. Enable providers (Google, Facebook, Apple, Discord, Guest) as needed.Billing: Enable for in-app purchases and store functionality. Requires Authentication to be enabled.Ticketing: Enable for in-game customer support.
Platform-specific setup
iOS
- Install Cocoapods:
sudo gem install cocoapods - Set minimum iOS deployment target to 12.0 or higher in Unity Player Settings
- Enable “Add iOS Entitlements” in Playtolia Settings if using Sign in with Apple
Android
- Set minimum API level to 21 (Android 5.0) or higher
- Set target API level to the latest available
- Internet permission is added automatically
Common Issues
Build Errors:- “PlaytoliaGameObject script not found” — Ensure you imported all folders from the Unity package
- iOS build fails with Cocoapods errors — Update Cocoapods and ensure Xcode command line tools are installed
- Android build fails with permission errors — Check that Unity Android settings allow internet access
- “Game ID not configured” error — Set your Game ID in Project Settings > Playtolia Settings
- Authentication always returns null — Ensure Authentication is enabled and you’re connected to the internet
- Store/Wallet/Entitlements return empty — These APIs only return data after successful authentication