1. 设置横幅广告回调方法
Yodo1U3dSDK.setBannerdDelegate((Yodo1U3dConstants.AdEvent adEvent,string error)=>
{
Debug.Log ("BannerdDelegate:" + adEvent + "\n" + error);
switch (adEvent)
{
case Yodo1U3dConstants.AdEvent.AdEventClick:
Debug.Log("Banner ad has been clicked.");
break;
case Yodo1U3dConstants.AdEvent.AdEventClose:
Debug.Log("Banner ad has been closed.");
break;
case Yodo1U3dConstants.AdEvent.AdEventShowSuccess:
Debug.Log("Banner ad has been shown successful.");
break;
case Yodo1U3dConstants.AdEvent.AdEventShowFail:
Debug.Log("Banner ad has been show failed, the error message:" + error);
break;
}
});
2. 设置横幅广告位置
Yodo1U3dAds.SetBannerAlign(Yodo1U3dConstants.BannerAdAlign.BannerAdAlignBotton
|Yodo1U3dConstants.BannerAdAlign.BannerAdAlignHorizontalCenter);
3. 展示横幅广告
Yodo1U3dAds.ShowBanner();
4. 隐藏横幅广告
Yodo1U3dAds.HideBanner();
5. 检查当前是否可以播放横幅广告
bool isReady = Yodo1U3dAds.BannerIsReady();
评论
0 条评论
文章评论已关闭。