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:
Add to My Assets
on the GPM asset page. This will link the package to your Unity account.In your Unity Project, go to Window > Package Manager and click on My Assets in the dropdown menu at the top of the window.
Select Game Package Manager from the list of available assets, and click Import.
After importing GPM, navigate to Tools > GPM > Manager. In the left panel, select WebView and click Install.
<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
Download and extract the latest Source Code
release from unity-sdk github.
Navigate to Window > Package Manager in your Unity Project.
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.
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.
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:
Open Edit > Project Settings in your Unity project
Under Player, navigate to publisher settings for Android
Tick the Custom Main Gradle Template and Custom Gradle Properties Template options. This will create two files inside Assets/Plugins/Android
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'
}