Installing Hiro GDK #
Before proceeding ensure that you have:
The client is available from Heroic Labs. Contact us to request access.
Hiro.unitypackage contains all source code and DLL dependencies required in the client code.
After downloading the file:
- Drag or import it into your Unity project
- Set the editor scripting runtime version to .NET 4.6 (from the Edit -> Project Settings -> Player -> Configuration menu).
GDK deterministic startup #
A key philosophy of the Hiro GDK is its opinionated and structured method for bootstrapping your game using a deterministic startup. This is achieved by inheriting from the
GdkCoordinator and sequentially configuring and adding the required game Systems.
The GDK provides several different Systems out-of-the-box, such as the
NakamaSystem (which handles the connection to Nakama and keeps a reference to the Client, Session and Socket objects) and the
EconomySystem (which handles all aspects of in-game economy including both soft and hard currency purchases).
In the Scene Hierarchy, create a new Game Object and call it
Attach a new C# script to the object and call it
GameCoordinatorto configure and add individual
Systeminstances to a
Systemsobject and return it:
These individual systems will be initialized in the order you specify, enabling you to have full control over the order of initialization.