This document is for developers who have previously integrated the v18.x Unity SDK and are looking to update their integration to using the latest v19.x and later releases of our Unity SDK. This latest version of the Unity SDK now provides support for real-time, synchronous gameplay along with improvements and miscellaneous bug fixes.
Delete the Assets/Skillz folder in Unity
Make sure to save any custom code you wrote in any of 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 Skillz Unity SDK, you no longer have to edit the SkillzDelegate script that’s attached to your SkillzDelegate game object.
Create a controller class to implement either SkillzSyncDelegate or SkillzMatchDelegate interface
If you are looking to support real-time, synchronous gameplay create a Controller class which implements the SkillzSyncDelegate interface.
public class GameSyncController : MonoBehaviour, SkillzSyncDelegate
If your game supports asynchronous gameplay, create a Controller class which implements the SkillzMatchDelegate interface.
public class GameController : MonoBehaviour, SkillzMatchDelegate
Update your OnMatchWillBegin and OnSkillzWillExitcallbacks
Previously in the v18.x integration, these callbacks were implemented in the SkillzDelegate script - these will now be implemented in the controller class you’ve created in the previous step.
Make sure to load your game scene in this function. You can use the IsSynchronous boolean in the SkillzSDK.Match object to determine whether the match is synchronous or asynchronous. (This match object can also be fetched directly from the Skillz API by calling GetMatchInfo).
public void OnMatchWillBegin (SkillzSDK.Match matchInfo)
isSyncMatch = true;
isSyncMatch = false;
If you’d like the option for a user to exit the Skillz interface and load your initial main menu, you can load that scene here. This function is called by the Skillz SDK when a user exits out of the skillz experience.
public void OnSkillzWillExit ()
More information can be found in this article.
Follow the rest of the implementation, steps 3 - 8 listed in this article.
WARNING: Skillz Fairness Migration
You will need to take special consideration on how you use the Skillz random number generator methods. The RNG method must remain consistent across all versions to ensure a fair experience for all users playing on different versions of your game.
This means that if you previously were using "Api.GetRandomNumber()", rather than the Api.Random class and related functions on iOS, you will need to switch to using SkillzCrossplatform.Random.Value(), and will need to disable old binaries when releasing this update in order to ensure fairness.
Should you require any guidance or assistance in this transition, email firstname.lastname@example.org.
Note: The adjustments required for iOS build process still remains
- You will need to target minimum iOS version to 9.0 or higher
- You will need to modify supportedInterfaceOrientationsForWindow in UnityAppController.mm
See steps 1 and 5 of this article for details.