Skip to main content
Version: 29.1.28

Launch the Skillz UI

Overview

Once the Skillz SDK is added to your project (Link to Install SDK page), it is time to start setting up the core of your game loop, launching the Skillz UI. Standard user flow is App Launch -> Landing Page -> Launching the Skillz UI and from within the UI your players will have a variety of different interface to interact with. To understand more about the Skillz UI, please refer to this documentation.

The below steps will walk you through setting up some core elements of the Skillz SDK, helping you to accomplish your first steps of your Skillz integration.

Important Note for Unity Integrations

To better understand how the Skillz SDK works with Unity please refer to our guidance on Unity Script Execution

Implement the SkillzManager or SkillzDelegate

Control of your application is given to Skillz when you launch the Skillz UI. Because of this, you'll need to add the Skillz Manager (Unity) or implement the Skillz Delegate interface (Other), which contains callbacks that will be invoked for key events. There are three events that are essential for interacting with Skillz:

  1. When a match is starting.
  2. When the user is exiting the Skillz UI (via the sidebar menu).
  3. When trying to enter the Progression Room

For Unity, you need to add the Skillz Manager prefab to your start menu scene.

  1. Right click in the Heirarchy and select Create Empty. In the inspector, click Add Component then add the Skillz Manager component.

  2. Open the Skillz Manager with the Inspector.

  3. Choose a Game Scene, Start Menu Scene, and optionally a Progression Room Scene.

Skillz Manager

  1. For additional logic you may add a script to the Skillz Manager by selecting Add Component, then selecting a custom script.

Methods from this script can then be called by pressing the + button under the On Match Will Begin, On Skillz Will Exit, and On Progression Room Enter, then selecting public methods from the added script.

Skillz Manager

NOTE: If your project does not use multiple scenes, the scene fields can be left blank.

Initialize Skillz

Once you have at least stubbed in the delegate functions, you are not able to initialize Skillz. This is usually right after your game's process has finished launching or in your game's start screen (if there is one).

You must initialize Skillz before you can launch it.

Skillz is initialized when your game starts up. Make sure you have configured your game appropriately.

Launch Skillz

With Skillz initialized, you can now launch it to take over control of your interface. Typically, Skillz is launched from your game's start screen. Specifically, we recommend that your game's start screen has a button to launch Skillz when it is clicked. The examples below all follow that pattern.

TitleScreenController.cs
public sealed class TitleScreenController : MonoBehaviour
{
public void PressPlayButton() {
SkillzCrossPlatform.LaunchSkillz();
}
}

Note: Skillz Unity Lifecycle

The Skillz SDK does not change scenes. The Skillz Unity UI is a native iOS/Android Activity. So you'll only detect an OnApplicationPause when it loads or unloads.

Skillz Lifecycle

To prevent problems with residual game-state, our suggestion is to create a simple "Loading" scene. Whenever you invoke either of the Skillz functions SkillzCrossPlatform.LaunchSkillz(), or SkillzCrossPlatform.ReportFinalScore(score) - your code should also load your "Loading" scene via SceneManager.LoadScene. This will force your current scene to unload, so that way every match will start with totally fresh assets.

If your game is not making use of loading separate scenes - then instead of calling SceneManager.LoadScene - your code is instead responsible for cleaning up all of the variables and game-state in the current scene.

Exit Skillz

Users can exit Skillz via a sidebar menu item. When this happens, a callback in your Skillz Manager or Skillz Delegate implementation is invoked. You'll want to handle this callback to load an appropriate game screen. This typically will be the main menu/start screen.

Set the Start Menu Scene in the Skillz Manager.

Build and Test

The completed Skillz Manager (Unity) or Skillz Delegate (Other) should resemble this:

Skillz Manager

SIDEkick

If your game is made with Unity, you can simulate launching Skillz from the editor by using the Skillz SIDEkick before exporting and building for iOS or Android. If you are having issues, more insight can be gained by turning on debug logging in the Skillz settings.

You should now be able to launch the Skillz UI from your game. Please build your game and verify that Skillz can launch from a mobile device in order to get your first checkmark in the Developer Console.

Next Steps

In this article, you learned how to launch the Skillz UI from your game. The next article will describe how to start matches.