NinthDecimal Unity Wrapper Documentation
Wrapper documentation is provided as a reference for implementing the NinthDecimal SDK into a Unity projects.
This wrapper is open source. To make changes, please open a pull request on the repository.
The Unity package contains both the iOS and Android SDK. Currently, the iOS SDK version included is 3.0.1. The Android version is 3.0.0.
The NinthDecimal Prefab enables the input of the iOS or Android app key and secret right from the inspector pane.
The NinthDecimal object enables the attaching of user information without user intervention. For example, if the user’s e-mail address is already know, the reward unit can be pre-populate with this information.
The NinthDecimal Object contains the following properties that can be set:
The NinthDecimal Object contains the following methods that can be called:
Calling a saveMoment method is used to specify the event in which to deliver a reward.
KiipEvents.cs contains events used to listen in on sessions and rewards.
This event is fired after a NinthDecimal session starts.
Called if sessionStartedEvent fails. String: error string describing what went wrong.
Listen to these events so you’ll have a chance to execute something before the reward is shown. Typically for lowering game volume, ensuring the correct UI is present in the background, etc.
Called after a successful moment save. This is called whether or not there is a reward to show.
Handles error. String: error string describing what went wrong.
Called when a full screen interstitial appears.
Called when a full screen interstitial disappears.
Called when the reward workflow starts.
Called when the entire reward workflow has ended.
Called when a video reward will play.
Called when a video is finished (via user or completion).
Content : The amount of content to provide a user after a successful redeem. This is used when rewards contain in-game currency delivery.
Moments can be called anywhere. Like the standalone iOS and Android SDKs, the saveMoment method is overloaded to allow for an optional argument.
The NinthDecimal SDK allows you to attach an asset or element when you show a notification view. This promotes a higher level of immersion for your app’s UX.
To create custom notification, design a simple UI button element for users to tap or click.
Once created, show your notification within the
onSaveMomentFinishedEvent Kiip event. Make sure
showPoptart() has been added to your UI button’s onClick method.
We’re happy to answer any questions about integrating NinthDecimal. Please email us.