- Home /
Question by
davidhritz · Apr 23, 2019 at 12:17 PM ·
adsbanner
No Banner Ads
I believe that I followed the documentation correctly in implementing banner ads. However, Xcode reports: No placements found in realtime V5 campaign json.
Here is the code that I'm using. (gameID is correct in the code)
using System.Collections;
using UnityEngine;
using UnityEngine.Advertisements;
public class BannerAds : MonoBehaviour {
public string bannerPlacement = "banner";
#if UNITY_IOS
public const string gameID = "...";
#elif UNITY_ANDROID
public const string gameID = "...";
#endif
void Start () {
Advertisement.Initialize(gameID, false);
StartCoroutine(ShowBannerWhenReady());
}
IEnumerator ShowBannerWhenReady() {
while (!Advertisement.IsReady(bannerPlacement)) {
yield return new WaitForSeconds(0.5f);
}
Advertisement.Banner.Show(bannerPlacement);
}
}
Comment