This article will walk you through installing the Skillz SDK in your Unity project. Additionally, it will walk you through generating and configuring an instance of a Skillz Delegate game object to prepare your game for integrating Skillz.
Skillz Unity SDK Installation
Download the Skillz SDK
The latest version of the Skillz SDK for Unity can be found at the Downloads section of the Skillz Developer Console.
Decompress the file after it has finished downloading. Everything will be decompressed into a folder that starts with
skillz_unity_crossplatform. Relative to that folder will be a
sdk_unity_crossplatform_<SDK_VERSION>/Unity/sdk_unity_crossplatform/skillz_unity-<SDK_VERSION>.unitypackage file where
SDK_VERSION is the version of the Skillz SDK that was downloaded.
Import the Unity Package Into Your Project
skillz_unity-<SDK_VERSION>.unitypackage into your Unity project. With your project open in Unity, click the
Assets -> Import Package -> Custom Package... menu item. Select the
skillz_unity-<SDK_VERSION>.unitypackage file from the previous step.
A dialog will pop up where you can choose the assets from the package to import. It will look similar to:
Click the 'All' button to make sure everything is checked. Next, click the 'OK' button.
The Skillz SDK is now installed in your Unity project. You should see a
Skillz folder under
Assets in your project tab:
Skillz Delegate Game Object Generation
Before you can integrate your game with Skillz, you'll need to generate an instance of a Skillz Delegate game object.
An Important Note About the Skillz Delegate Skillz Delegate
Your Skillz Delegate object instance is referenced when the Skillz UI is being launched. As a result, it is highly recommended that you generate the Skillz Delegate game object in the scene that will launch Skillz. This typically is a scene that represents a game's start screen; in turn, the screen will have a button that the player presses to launch Skillz.
Generating the Skillz Delegate object in a different type of scene will have unintended behavior.
Generate a Skillz Delegate Game Object
First, open your Unity project. There should be a
Skillz -> Generate Delegate menu item:
Select this menu item to insert an instance in the current scene. You should now see it in the scene editor:
Configure the Skillz Delegate Game Object
Select the Skillz Delegate game object that was generated earlier. You'll some fields for it in the Inspector tab:
Enter your game's ID that was created on the Skillz Developer Console. Next, make sure the Skillz Environment is set to
Sandbox while you are testing your game; you will switch it to
Production when your game is ready to go live on Skillz and the appropriate app store. Finally, select the orientation that your game will be set to (NOTE: this only applies for Android).
You are now ready to integrate your game with Skillz!
Building Your Game
The following instructions are for building your project after you've finished integrating the Skillz SDK. Go to these instructions for integrating the Skillz SDK, then come back here to build it.
Build Your Game For iOS
Set the Target iOS Version
Go to your
iOS Player Settings -> Configuration, and set the target minimum iOS version to 9.0 or higher.
Build to an Xcode Project
File -> Build Settings, select iOS then
Build. You should be prompted to locate where you saved the
Check Code Sign on Copy in Embed Frameworks
Go to your project's target and click
Build Phases -> Embed Frameworks. Make sure that
Code Sign on On Copy is checked for
Modify supportedInterfaceOrientationsForWindow in UnityAppController.mm
UnityAppController.mm, find the function
supportedInterfaceOrientationsForWindow. Currently, this method returns the following:
return (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationPortraitUpsideDown) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationLandscapeLeft);
Since Skillz doesn’t support switching orientations between Portrait and Landscape, you’ll need to modify this function to either Portrait Only or Landscape Only.
return (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationPortraitUpsideDown);
return (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationLandscapeLeft);
Disable Bitcode (If Needed)
If you are building on a device, you may run into an error about your game not supporting bitcode. Here’s an example error:
/Skillz.framework/Skillzdoes not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
You can disable this by going to your target's Build Settings then setting
Enable Bitcode to
You should now be able to build on a device via Xcode.
We’re always here to help. Contact firstname.lastname@example.org if you run into any issues.
Build Your Game For Android
When you generated a SkillzDelegate game object by pressing
Skillz -> Generate Delegate, this also generated your
build.gradlefiles, which are stored in
Assets/Plugins/Android. Feel free to customize these files based on your needs.
When building an Android Studio project or building an apk directly to a device, you’ll need to change the permissions folder of Unity’s gradle version so that our Android Build Process can update your Gradle version temporarily. In order to do this, open your terminal and perform the following command:
sudo chmod -R 757 /Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle
Export to Android Studio
If you choose to export to Android Studio, make sure to click on
Then, in Android Studio, go to
File -> New -> Import Project and select the exported directory. Your Android studio project will still contain the
build.gradle files that were inside
Assets/Plugins/Android of your Unity project. Perform any changes you wish to make and you should now be able to build on a device.
- The application needs to set the attribute
falseor completely remove the attribute
- The main activity's
launchModeshould be assigned as
- The main activity should have the following:
<application android:isGame="false"> <activity android:launchMode="singleTop" android:clearTaskOnLaunch="false" android:alwaysRetainTaskState="true"> </activity> </application>
email@example.com if you run into any issues.