This document is for developers who have previously integrated the v20.x Unity SDK and want to update their integration using the latest v21.x and later releases of our Unity SDK. The latest version of the Unity SDK now provides support for player experience levels, user interface improvements, and miscellaneous bug fixes.
Important Note: 21.x made changes to the Android build.gradle including updated compiled and target SDK versions to be 27. We also made updates to accommodate changes to Java 8 and added lines to the Proguard file. If you plan to update your game’s SDK to 21.x through Android Studio, follow this article instead. For iOS, updating the Skillz SDK to 21.x is as simple as replacing the Skillz.framework file. You can learn more about it here.
Permissions Note: Due to Android now being built with Android SDK 27, your app will begin asking for permissions at runtime, rather than at install time. Unity typically operates by asking for all possible permissions on the first launch of your app, and this can be overwhelming/offputting to your users. If you're certain that all of your plugins properly handle permissions at runtime, you can include this tag in your AndroidManifest.xml file, and Skillz will only ask for the permissions it needs, and those asks will be curated to provide maximum value.
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
You can learn more about this from Unity themselves here, under the heading "Runtime permissions in Android 6.0".
Delete the Assets/Skillz folder in Unity
Make sure to save any custom code you wrote in these Skillz files for safe keeping. In your Unity project, delete the Skillz folder located within Assets in your Unity project.
Import the new Unity package
With your Unity project open, double-click on the Unity package, skillz_unity_crossplatform.unitypackage, found inside the downloaded Unity SDK.
Ensure SkillzDelegate game object has your Game ID and a SkillzDelegate script
If a SkillzDelegate script is no longer attached to the game object, you can simply attach the SkillzDelegate script that came with the downloaded Unity SDK. You can also delete the SkillzDelegate gameobject and regenerate it again by clicking on Skillz > Generate Delegate in the Unity header toolbar.
Note: In the 19.0.x and newer Skillz Unity SDK, you no longer have to edit the SkillzDelegate script that’s attached to your SkillzDelegate game object.
Delete Assets/Plugins folder
Before deleting this folder, make sure to save any of the files you created. We need to delete this folder to ensure that the Android Manifest, Build.gradle, and Proguard files used to build your Android project is up-to-date.
After saving your files for safekeeping and deleting this folder, regenerate the Android Manifest. You can do that by clicking on Skillz/Regenerate Android Manifest:
You have now updated your project to 21.x and are now able to re-export your projects to both iOS and Android. If you encounter a problem, please email email@example.com with a detailed description of the issue you are encountering.
Custom Theming Warning - If your game takes advantage of our custom themed SDK feature, you will need to build an .ipa or .apk with the new SDK version, upload it to our developer portal, and sync your game to Production. Prior to that, you may see artifacts within your custom theme.