Requirements
- Unity 6000 or later
- Xcode (for iOS builds)
- Cocoapods (for iOS builds)
- Android SDK (for Android builds)
1
Getting the SDK
2
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 into your project.
3
Creating a Playtolia Game Object
Add the PlaytoliaGameObject to your initial scene to initialize Playtolia components.
Quick setup
Simply drag and drop the PlaytoliaGameObject prefab (located atAssets/PlaytoliaSDK/Prefabs/PlaytoliaGameObject.prefab) to your main scene.Manual setup
You can create your own PlaytoliaGameObject for customization. Make sure that GameObject name matches “PlaytoliaGameObject” exactly.1
Create a new game object
Go to your scene and create an empty game object at the root by right clicking in your scene hierarchy and selecting GameObject > Create Empty.
2
Add PlaytoliaGameObject script
Click on your new game object, and use the inspector to add PlaytoliaGameObject script as a new component.The PlaytoliaGameObject script handles:
- SDK initialization on scene start
- Message routing between native code and Unity
- State management for all Playtolia components
4
Configure Playtolia
Navigate to Edit > Project Settings > Playtolia Settings to access the configuration panel.
Essential Configuration
Game ID: Your unique game identifier from the Playtolia dashboard. This is required for all API calls.Logging Level: Control SDK logging verbosity:- None: No logging (recommended for production)
- Error: Only error messages
- Warning: Errors and warnings
- Info: General information (recommended for development)
- Debug: Detailed debugging information
Component Configuration
Authentication: Enable to use login/logout features- Authentication Required: If enabled, login dialog appears automatically
- Providers: Enable Google, Facebook, Apple, Discord, and Guest authentication
- Requires Authentication to be enabled
- Includes Wallet, Store, and Entitlements APIs
5
Platform-specific setup
iOS Setup
- Cocoapods Installation: Ensure Cocoapods is installed on your Mac
- iOS Deployment Target: Set minimum iOS version to 12.0 or higher in Unity Player Settings
- Add iOS Entitlements: Enable this option in Playtolia Settings if using Sign in with Apple
Android Setup
- Minimum API Level: Set to API level 21 (Android 5.0) or higher
- Target API Level: Use the latest available API level
- Internet Permission: Automatically added to AndroidManifest.xml
Verifying Your Setup
Create a simple test scene with the PlaytoliaGameObject and build to your target platform.TestPlaytolia.cs
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