我创建了一个应用程序,其中AdMob标语从头开始(脚本中仅一次)。并且当我关闭应用程序时,我的“ AdMob网络请求”帐户显示例如以前的数字是30,现在是34,难道不应该只增加一个数字吗?
... 使用GoogleMobileAds.Api; ... 公共类GoogleMobileAdsDemoScript:MonoBehaviour { 私人RewardBasedVideoAd rewardBasedVideo; ...
public void Start()
{
#if UNITY_ANDROID
string appId = "ca-app-pub-3940256099942544~3347511713";
#elif UNITY_IPHONE
string appId = "ca-app-pub-3940256099942544~1458002511";
#else
string appId = "unexpected_platform";
#endif
// Initialize the Google Mobile Ads SDK.
MobileAds.Initialize(appId);
// Get singleton reward based video ad reference.
this.rewardBasedVideo = RewardBasedVideoAd.Instance;
this.RequestRewardBasedVideo();
}
private void RequestRewardBasedVideo()
{
#if UNITY_ANDROID
string adUnitId = "ca-app-pub-3940256099942544/5224354917";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-3940256099942544/1712485313";
#else
string adUnitId = "unexpected_platform";
#endif
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the rewarded video ad with the request.
this.rewardBasedVideo.LoadAd(request, adUnitId);
}
}