1
Install the Playtolia package
The recommended method is the Playtolia scoped registry. This method gives you the version
list in the Package Manager and a one-click Update button.Open Edit ▸ Project Settings ▸ Package Manager ▸ Scoped Registries. Click the
+
button. Then type these values:- Name:
Playtolia - URL:
https://dist.playtolia.com/unity-sdk - Scope(s):
com.playtolia
The core SDK has no Firebase dependency. The
Firebase Unity SDK is necessary only for
Push Notifications. Push Notifications are off by default. For more information, see
Push Notifications.
2
Add the Playtolia GameObject
Playtolia initializes from one component in your first scene.
- Create an empty GameObject at the root of your initial scene.
- Rename the GameObject to
PlaytoliaGameObject(case-sensitive). - Select the GameObject. In the Inspector, click Add Component and add the
PlaytoliaGameObjectscript.
3
Configure Playtolia
Open Edit ▸ Project Settings ▸ Playtolia ▸ General. Then type the values for your project.
- Game ID: the unique identifier of your game from the Playtolia dashboard. Every API call needs this value.
- Logging Level: the quantity of SDK log output: None, Error, Warning, Info, or Debug.
- Authentication: enable this setting for login and logout. “Authentication Required” shows the login prompts automatically. Enable the providers that you need (Google, Facebook, Apple, Discord, Guest).
- Billing: enable this setting for in-app purchases and store features. Billing needs Authentication.
- Ticketing: enable this setting for in-game customer support.
4
Set up your build targets
iOS
- Install CocoaPods:
sudo gem install cocoapods - In Player Settings, set the minimum iOS deployment target to 13.0 or higher
- If you use Sign in with Apple, enable “Add iOS Entitlements” under Playtolia ▸ General
core.framework and the CocoaPods dependencies to the generated
Xcode project automatically.Android
- Set the minimum API level to 24 (Android 7.0) or higher
- Set the target API level to the latest available
- EDM4U resolves the Android native dependencies from Maven Central at the first Android
build. You add no
.aarfiles manually. The build adds the internet permission for you.
Test that it works
Import the Smoke Test sample from Package Manager ▸ Playtolia SDK ▸ Samples ▸ Smoke Test. This sample makes sure that the SDK initializes and that the native bridge responds.Common Issues
Build errorsPlaytoliaGameObjectscript not found: make sure that the package resolved in the Package Manager without errors. If you enabled Push, make sure that the Firebase Unity SDK is imported.- iOS build fails with CocoaPods errors: update CocoaPods. Then make sure that the Xcode command line tools are installed.
- Android build fails to resolve dependencies: wait for EDM4U to complete. If EDM4U is not
installed, install
com.google.external-dependency-manager. Then make sure that the Android settings of Unity permit internet access.
- “Game ID not configured”: set your Game ID in Project Settings ▸ Playtolia ▸ General.
- Authentication always returns null: make sure that Authentication is enabled and that the device is online.
- Store / Wallet / Entitlements return empty: these APIs only return data after a successful login.
Next Steps
Authentication
Add player login with more than one provider
In-game Stores
Create and manage your in-app purchase store