> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playtolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Learn how to integrate Playtolia to your Unity game.

### Requirements

* Unity 6000 or later
* [Xcode](https://developer.apple.com/xcode/) (for iOS builds)
* [Cocoapods](https://cocoapods.org) (for iOS builds)
* Android SDK (for Android builds)

<Steps>
  <Step title="Getting the SDK">
    <Card icon="download" href="https://github.com/Playtolia/unity-sdk/releases/download/v1.3.2/PlaytoliaSDK-132.unitypackage" title="Get Playtolia Unity SDK">
      Latest release (1.3.2)
    </Card>
  </Step>

  <Step title="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.

    <Warning>
      Import all folders including Plugins, Scripts, and Prefabs. Missing any folder may cause compilation errors or missing functionality.
    </Warning>
  </Step>

  <Step title="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.

    <Warning>
      The GameObject must be named "PlaytoliaGameObject" exactly (case-sensitive). The native library uses this name to route messages to Unity.
    </Warning>
  </Step>

  <Step title="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.

    <Warning>
      Always test your configuration in Development environment before switching to Production.
    </Warning>
  </Step>

  <Step title="Platform-specific setup">
    ### iOS

    1. Install Cocoapods: `sudo gem install cocoapods`
    2. Set minimum iOS deployment target to 12.0 or higher in Unity Player Settings
    3. Enable "Add iOS Entitlements" in Playtolia Settings if using Sign in with Apple

    ### Android

    1. Set minimum API level to 21 (Android 5.0) or higher
    2. Set target API level to the latest available
    3. Internet permission is added automatically
  </Step>
</Steps>

### 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

**Runtime Issues:**

* "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

### Next Steps

<CardGroup cols={2}>
  <Card icon="arrow-right-to-bracket" href="/for-unity/authentication" title="Authentication">
    Set up player login with multiple providers
  </Card>

  <Card icon="store" href="/for-unity/billing/in-game-stores" title="In-game Stores">
    Create and manage your in-app purchase store
  </Card>
</CardGroup>
