This CodeLab covers the steps to accessing the latest official Gameboard Unity SDK. The Gameboard Unity SDK exposes all the functionality unique to Gameboard in order to reduce the effort of creating games.
Video Walkthrough:
To consume the published package in UnityHub you have to:
Within Windows -> Package Manager pressing down in the arrow icon you will find an entry called My registries. The displayName should be displayed below the author name (both defined in the package.json)
After installing the package, find the Gameboard menu at the top of the unity header, and click "Add SDK" to add the Gameboard GameObject to your project:
For some things, you will want to wait for the Gameboard SDK to be initialized first. You can check if the Gameboard SDK is initialized by checking the IsInitialized
property, and if it isn't yet you can subscribe to the GameboardInitializationCompleted
event, so your method will be called right after initialization is completed.
private void Start()
{
GameObject gameboardObject = GameObject.FindWithTag("Gameboard");
var gameboard = gameboardObject.GetComponent<Gameboard>();
if (gameboard.IsInitialized)
{
OnGameboardInitialization();
}
else
{
gameboard.GameboardInitializationCompleted += OnGameboardInitialization;
}
}