Import the SDK
1
Download the ZBD SDK
Reach out to your ZBD Customer Success Manager to get access to the Unity SDK package.
2
Import the .unitypackage
To import a package, right-click the assets folder in Unity Editor and choose
"Import Package..."
.3
Drag and drop the ZBDSDK into your scene
Navigate to the newly imported ZBD folder
Prefabs
and drag and drop the ZBDSDK prefab into your scene.4
Adjust UI elements (Optional)
Due to your specific scene resolution settings and orientation you may need to resize/adjust the included UI elements. We will explain how to do this in more detail later in this documentation, but for now we are assuming the UI element has imported correctly.
Add your App ID
You should have received yourApp ID
from your ZBD Customer Success Manager. You’ll need to set this in the ZBDController
script which is attached to the ZBDSDK
game object in the ZBDSDK prefab.

Initialize the SDK
You must set the
userId
property during initialization of the SDK if you want ZBD to share event data for your users (e.g. user signed up for ZBD app
).userId
: this is your internal userId that can be attributed to a ZBD user.Please reach out to your ZBD Customer Success Manager if you face any issues.
Initializing SDK without userId
You can also set the userId
at any time after initialization by calling:
This will allow the user to start earning, however in order to withdraw they will need to download the ZBD app, get their ZBD Gamertag and register it with the ZBD Rewards SDK.The easiest way to do this is to present the ZBD modal. If the user has not registered their ZBD Gamertag then they will be guided through it inside the modal.
Presenting SDK Modal
ShowModal()
will present a modal prompting the user to enter a ZBD Gamertag, or to sign in if they were not signed in automatically.
Users can also view their balance and initiate a withdrawal from this modal.
Detecting Modal Visibility
You may want to stop the gameplay or trigger some other event when the SDK modal becomes visible. You can detect when the modal is visible via 2 methods: Subscribe to theModalIsVisible
event
IsModalVisible()
You can also call IsModalVisible()
to check the status of the modal.