Updating Unity from Skillz SDK 17x to 19x+

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 and later releases of our 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.

Step 1:

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.

Screen_Shot_2018-02-09_at_1.34.16_PM.png .       Screen_Shot_2018-02-09_at_1.34.39_PM.png

Step 2:

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.

Screen_Shot_2018-02-06_at_11.52.57_AM_copy.png

Step 3:

Generate the SkillzDelegate game object

Click on Skillz > Generate Delegate to create the new SkillzDelegate game object.

Screen_Shot_2018-02-09_at_1.39.33_PM.png

Edit this game object by inputting your game ID, choosing your environment and ensuring a SkillzDelegate script is attached.

Screen_Shot_2018-02-09_at_1.39.48_PM.png

 

Step 4:

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
{
}

Step 5:

Update OnMatchWillBegin and OnSkillzWillExit callbacks, shown in this article.

Step 6:  

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 integrations@skillz.com.  

Note: Below lists additional changes to iOS build process

  1. You will need to target minimum iOS version to 9.0 or higher
  2. You will need to modify supportedInterfaceOrientationsForWindow in UnityAppController.mm

See steps 1 and 5 of this article for details.