- Home /
Question by
iSizz · Jun 01, 2019 at 09:09 AM ·
c#scripting problemadsunity adsadvertising
Unity Ads Banner not working.
Its just not showing, i also created a new GameObject and added this script.
public string gameid = "3170875";
public string placementId = "bannerPlacement";
public bool testMode = true;
void Start ()
{
if(Application.platform==RuntimePlatform.IPhonePlayer)
{
gameid = "3170875";
}
else if (Application.platform==RuntimePlatform.Android)
{
gameid = "3170875";
}
Advertisement.Initialize (gameid, testMode);
StartCoroutine (ShowBannerWhenReady ());
}
IEnumerator ShowBannerWhenReady () {
while (!Advertisement.IsReady (placementId)) {
yield return new WaitForSeconds (0.5f);
}
Advertisement.Banner.Show (placementId);
}
}
Comment
Your answer
Follow this Question
Related Questions
Why is Unity Ads not showing an ad in unity 5.2? 5 Answers
How to show an ad every 4 times my player dies 5 Answers
Not sure how to get OnUnityAdsShowClick working. Please help. 1 Answer
How to use the new Unity ads? 1 Answer
Can't hide ads 1 Answer