Hi,
I can’t figure out why adds are not showing in my game. This is an Android build. I downloaded the lastest Unity Ads package. Everything seems to be set up correctly in the Unity Dashboard.
Advertisement.IsReady(placementId) always returns false and I don’t know why.
I looked for solutions on this forum but none worked.
This is driving me nuts. Could you guys help me ou
public class AdsManager : MonoBehaviour
{
public bool testMode;
public string gameId = "XXXX";
public string placementId = "bann";
public IEnumerator Start()
{
Debug.Log("Advertisement.Initialize");
Advertisement.Initialize(gameId, testMode);
while(!Advertisement.IsReady(placementId))
{
Debug.Log("Advertisement NOT ready");
yield return null;
}
Debug.Log("Advertisement ready");
Advertisement.Banner.Show(placementId);
}
}
t?
Can you include a log. You can direct message me if you prefer to keep it private. Nothing looks wrong with what you shared in your script, so my top guesses are these:
- You have no fill and so the placement is not ready, which is technically working as expected. Whats your region?
- You typo’d your gameId (including swapping android and ios gameId)
- You typo’d your placement id… (bann does look a little suspect…maybe you meant banner?)
This working now. But only in test mode. What I had to do is declare the gameId and placementId variables inside the function itself.
public IEnumerator Start()
{
string gameId = "3836901";
string placementId = "banner";
Debug.Log("Advertisement.Initialize");
Advertisement.Initialize(gameId, false);
while(!Advertisement.IsReady(placementId))
{
Debug.Log("Advertisement NOT ready");
yield return null;
}
Debug.Log("Advertisement ready");
Advertisement.Banner.SetPosition(BannerPosition.TOP_CENTER);
Advertisement.Banner.Show(placementId);
}
But I have another problem. The adds won’t show in production.
Can you post a full device log from a production game session? (You can record this using Logcat for Android and XCode for iOS)
This should give us a clue as to what is going wrong. It’s possible it’s a no fill issue, meaning no banners are currently available (this can happen for banners in some regions).
Is it that enough? I used this command line: adb logcat -s Unity
6363021–708111–logcat.txt (5.6 KB)
Hi, sorry for the delay in getting back to you about this. I don’t see any no fill errors in that log, so it looks like that isn’t the issue. However, I do see some errors in there that may be behind this.
Are you able to post a build of your game? If you don’t want to do that publicly, you can send it to unityads-support@unity3d.com to open a support ticket with us.