Unity API Wrapper
As a convenience for those using Unity, we offer a wrapper to simplify interaction with our API. Our wrapper provides the following features:
- - Automatically handles recording device properties.
- - Automatically handles the starting and stopping of game sessions.
- - Provides an Event Queue to batch events locally and then send them on a time and/or event basis.
- - Sends events asynchronously so as not to interrupt game play.
- - Provides a number of overload methods to easily log events.
Download Unity API Wrapper
Download the GAMEhud Unity wrapper package on Github: gamehud_unity_wrapper.
Here are the steps to help you get started tracking your game:
- 1) Register for a Trial account.
- 2) Once you have logged in, you will be walked through setting up your first game and as well as sending your first event.
- 3) Visit the Settings page for your game and copy down the Game API Key. You will need this to communicate with our API.
- 4) Import the gamehud_unity_wrapper package into your Unity game.
- 5) Drag the "GAMEhud Manager" prefab from the "GAMEhud Assets" directory to the first scene of your game.
- 6) Adjust the public variables on the GAMEhud prefab using the inspector. You need to set the Game API Key you got from step 3. Make any other configuration changes you want in the inspector.
- 7) Fire up your game! The wrapper automatically sends device properties.
- 8) You can send Unity logging information (warnings, errors, exceptions) by configuring the "GAMEhud Manager" using the inspector.
- 9) Custom events can be sent by inserting GameHudEventQueue.Log() in your game scripts. Please check the GameHudEventQueue script for the various overloads.
- 10) Check your account at GAMEhud for your logged statistics.
If you want to check out a very basic unity game demo showing integration, checkout our repository on Github at https://github.com/rubytreesoftware/gamehud_unity_demo.