Download the Unity Android SDK
- In your Unity project's Assets directory include the DisplaySdk.cs file and the aar library file from the display.io Unity SDK downloadable zip file.
- Init the SDK, call the InitDioSdk() method in a game object in your opening scene:
public class gameObj : MonoBehaviour {
// Use this for initialization
void Start () {
DisplaySdk.InitDioSdk();
}
}
- Bind the DisplaySdk script to a game object in your Unity scene.
- Edit the DisplaySdk.cs file and replace the YOUR_APPID# placeholder with your Application ID (please find your Application ID in your account on Developer Portal or ask your Account manager).
- To display an ad call the ShowAd() method with your Placement ID
(please find your Placement ID in your account on Developer Portal or ask your Account manager).
showAd("PLACEMENT_ID");
Our SDK supports binding callbacks to triggered Ad-Events.
Supported events:
- adShown
- adClick
- adClosed
- noAd
- adCompleted (Video Ads only)
To receive Ad-Event put your events handling code inside the HandleEvent() method implemented in the provided CS script.
Comments
0 comments
Article is closed for comments.