Hi,
I’m trying to place an ad banner in my games main menu but it doesn’t show up in the editor.
I installed Unity ads through the package manager (version 3.4.2) and implemented everything as shown here: Banner ads for Unity developers | Advertisement | 3.4.9
I also enabled test mode in the services tab and in the online dashboard project settings. There is still no test banner ad showing when I start the game. It seems to be stuck in the while loop checking if the advertisement is ready.
using UnityEngine.Advertisements;
public class AdLoader : MonoBehaviour {
public string gameId = "[here is my gameid from the dashboards project settings]";
public string placementId = "bannerPlacement";
public bool testMode = true;
void Start() {
Advertisement.Initialize(gameId, testMode);
StartCoroutine(ShowBannerWhenReady());
}
IEnumerator ShowBannerWhenReady() {
while (!Advertisement.IsReady(placementId)) {
Debug.Log("trying...");
yield return new WaitForSeconds(0.5f);
}
Advertisement.Banner.Show(placementId);
}
}
The console just outputs “trying…” as I already mentioned above. There are no errors or warnings.
When I build the game to android the ad banner also doesn’t show up.