This document is for developers who have previously integrated the v17.x Unity SDK and are looking to update their integration to using the latest v19.x Unity SDK. This latest version supports cross-platform integration which means you’ll only need one codebase to release to both iOS and Android. This version also supports real-time, synchronous gameplay and is packaged with other improvements and miscellaneous bug fixes.
Delete the old SkillzDelegate game object and the Assets/Skillz folder in Unity
Make sure to save any custom code you wrote in any of these Skillz files for safe keeping.
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.
Generate the SkillzDelegate game object
Click on Skillz > Generate Delegate to create the new SkillzDelegate game object.
Edit this game object by inputting your game ID, choosing your environment and ensuring a SkillzDelegate script is attached.
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 OnMatchWillBegin and OnSkillzWillExit callbacks, shown in this article.
Follow 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 email@example.com.
Note: Below lists additional changes to iOS build process
- 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.