Skip to main content
Version: 29.1.28

Using the Unity Companion

About​

The Unity Companion is a set of features that allows you to test your game's integration with Skillz within the Unity editor; there's no need to build and test on a mobile device beforehand. This greatly increases the velocity at which you can iterate on your game with Skillz.

Known Issues​

SkillzCrossPlatform.IsMatchInProgress() returns an error: Currently if you run and execute the Skillz Unity Companion in the Unity Editor the SkillzCrossPlatform.IsMatchInProgress() method tries to access a native (iOS or Android) method. This causes it to fail. Please note this is only an issue within the Unity Editor. This will be fixed in a future release.

Key Features​

Test Your Game's Workflow​

You can test your game's workflow with Skillz in the Unity editor after you've installed the Skillz SDK, launched the Skillz UI, and set up the core loop (Standard Gameplay Setup, Real-Time Sync). The Skillz SDK will display low-fidelity screens that simulate a basic Skillz workflow: launching Skillz, picking a match type, entering a match, and displaying match results.

NOTE: these screens do not actually connect to Skillz servers.

Simulate Match Wins, Losses, or Aborts​

The Unity Companion allows simulating if a match was won or lost. This lets you verify that your game has reported a player's final score to indicate that they have completed their match (Standard Gameplay Setup, Real-Time Sync).

Additionally, you can simulate that a match was aborted to verify that the corresponding call (Standard Gameplay Setup) was made.

Simulate Gameplay Parameters​

The Skillz SDK allows you to simulate Gameplay Parameters without having to connect to a Skillz server. This lets you easily experiment with how your game will behave depending on these parameters.

Testing Your Game's Workflow​

Switch to a Desktop Build Setting​

Open the Build Settings window from File > Build Settings menu item. Next, select the PC, Mac, and Linux Standalone option under the "Platform" section. Finally, click the "Switch Platform" button and close the window.

Run Your Game​

Now, run your game in the Unity editor. Please load the scene that will launch the Skillz UI. When the Skillz UI is launched, the SDK will load a screen similar to:

Skillz Launched

When you press the "Enter Match" button, the SDK will start a simulated match and display a countdown screen:

Match Starting

When the countdown reaches zero, you will discover immediately if you have set up the Skillz Delegate correctly to handle match starts (Standard Gameplay Setup, Realtime Sync). If handled correctly, your game scene will be launched. From then on, you can test your gameplay.

Simulating Match Wins, Losses, or Aborts​

Match Wins or Losses​

To simulate match wins or losses:

  1. Open the Skillz Settings window via the Skillz > Settings menu item.
  2. Under the "Simulated Match Results" section, check the Win the Match checkbox to simulate a match win; otherwise, it will simulate a match loss.

Afterwards, when you run your game as described above, you will see the appropriate screen when your game has reported the player's final score:

Simulated Match Win\ Simulated Match Loss

Match Aborts​

No setup is required to simulate match aborts. When aborting a match, the appropriate screen will be displayed:

Simulated Match Abort

Simulating Gameplay Parameters​

  1. Open the Skillz Settings window via the Skillz > Settings menu item.
  2. Enter the keys and values you would like to simulate under the "Simulated Match Parameters" section.
  3. Close the window.

NOTE: keys are limited to 255 characters while values have a maximum of 1000 characters.

When you run your game in the Unity editor, the SDK will provide those parameters when simulating a match.