Installation

Step 1: Install GPM

The PlaySuper Unity SDK relies on the GPM package which is available Unity Asset Store. Therefore, you must install and set up GPM before installing PlaySuper's Unity SDK. Follow these steps:

  1. Click on Add to My Assets on the GPM asset page. This will link the package to your Unity account.

Screenshot 2024-10-17 at 12.57.41.png

  1. In your Unity Project, go to Window > Package Manager and click on My Assets in the dropdown menu at the top of the window.

    Screenshot 2024-10-17 at 13.14.19.png

  2. Select Game Package Manager from the list of available assets, and click Import.

  3. After importing GPM, navigate to Tools > GPM > Manager. In the left panel, select WebView and click Install.

    Screenshot 2024-10-17 at 13.19.53.png

Step 2: Install PlaySuper’s Unity SDK

<aside> 💡 There are two ways to install the PlaySuper’s Unity SDK:

OpenUPM-CLI


If you have the OpenUPM CLI installed, you can install the OpenUPM registry with the following command:

openupm add com.playsuper.unity

Import from Github


  1. Download and extract the latest Source Code release from unity-sdk github.

  2. Navigate to Window > Package Manager in your Unity Project.

  3. Click on the plus icon in the navigation bar at the top, and choose Add Package from Disk. This will open a file navigation dialog.

    Screenshot 2024-08-10 at 13.53.25.png

  4. Navigate to the extracted unity-sdk-public folder**,** which was downloaded from Github in step 1. Select the package.json file to import the Unity SDK package.

Setup

Android

  1. Open File > Build Settings and make sure the Unity project is configured for Android. If you don’t see Android selected, follow the below steps:

  2. Open Edit > Project Settings in your Unity project

  3. Under Player, navigate to publisher settings for Android

    Screenshot 2024-08-09 at 10.24.18.png

  4. Tick the Custom Main Gradle Template and Custom Gradle Properties Template options. This will create two files inside Assets/Plugins/Android

  5. Open the Assets/Plugins/Android/mainTemplate.gradle file. You need to edit this file to include the following dependencies:

dependencies {
    ...
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
    implementation 'androidx.browser:browser:1.3.0'
    implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
}
  1. Open the Assets/Plugins/Android/gradleTemplate.properties file and add the following line to the end of the file.