Preparing Sphere Kit
Initialise Sphere Kit to be used throughout your game.
Sphere Kit uses a static class model, where the CoreServices class is available throughout your game. This means that you can access Sphere Kit services from any part of your code.
CoreServices controls the essentials of Sphere Kit functionality, including initialisation, authentication and achievements. To prepare the Sphere Kit CoreServices class, it is recommended to create a game object that is on the launch scene (i.e. the first scene that renders when your game opens).
Add a script to initialise Sphere Kit
Create a new script for your empty game object. We'll call it SphereKitScript in this example.

Replace the contents of your script with the following code (replace SphereKitScript with the name of your script).
using SphereKit;
using UnityEngine;
public class SphereKitScript : MonoBehaviour
{
private async void Awake()
{
await CoreServices.Initialize();
}
}Congratulations 🎉 Now, you can use CoreServices in any script in your game!
Last updated
