Skip to main content
This guide takes you from an installed package to a running SDK. If you did not add the package yet, start with Installation. That page gives the requirements and all install methods.
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
Click Save. Then install the package from Window ▸ Package Manager ▸ My Registries ▸ Playtolia ▸ Playtolia SDK ▸ Install.For a Git URL or a tarball, see Installation. That page gives all three methods and the full details.
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.
  1. Create an empty GameObject at the root of your initial scene.
  2. Rename the GameObject to PlaytoliaGameObject (case-sensitive).
  3. Select the GameObject. In the Inspector, click Add Component and add the PlaytoliaGameObject script.
CAUTION: Give the GameObject the exact name PlaytoliaGameObject. The native library sends messages to Unity by this name. An incorrect name stops the callbacks and shows no error.
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.
CAUTION: Do a test of your settings in the Development environment. Then change to Production.
4

Set up your build targets

iOS

  1. Install CocoaPods: sudo gem install cocoapods
  2. In Player Settings, set the minimum iOS deployment target to 13.0 or higher
  3. If you use Sign in with Apple, enable “Add iOS Entitlements” under Playtolia ▸ General
The build process adds the core.framework and the CocoaPods dependencies to the generated Xcode project automatically.

Android

  1. Set the minimum API level to 24 (Android 7.0) or higher
  2. Set the target API level to the latest available
  3. EDM4U resolves the Android native dependencies from Maven Central at the first Android build. You add no .aar files 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 errors
  • PlaytoliaGameObject script 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.
Runtime issues
  • “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