How to place ads in a ready game + one other question

Thanks @Dravin,
That got rid of the compiler errors, however when I try to attach the FullAd script to the adfull object, I still get the same error from above (screenshot #2)
Thanks again,
Greenreader9

3 Likes

Can you screenshot the code with the new title for me please? That error is usually because the names don’t match in the code. (Script name and script title)

2 Likes

@Dravin, Hope this helps

3 Likes

Remove the s from the title :slight_smile: that’s why

2 Likes

@Dravin Oops, I don’t know how I missed that, sorry. Good news, It works!!! Bad news, The banner ad overlays the full screen ad. Is there a timing thing I can put in place? Ex: After 10 seconds, close video ad, open banner ad
Or will I not get in trouble for publishing this? (If this is legally ok, than I can keep it this way)
Thanks again,
Greenreader9
game preview

3 Likes

Yay!! I’m so glad it works!!

I have doubts this will actually overlap once you export the project. Whenever you export the project and try this out, please let me know how it goes! I really hope this works out for you!!

3 Likes

Or if you want- make sure the FullAd gameobject is above the admanager gameobject in the hierarchy. Will this help it in the editor?

2 Likes

@Dravin, Thanks so much for all the help you have given me! Although not quite sure what you mean by having the FullAd gameobject above the admannager game object.
Like this?

3 Likes

No problem at all! It has been a pleasure to help out!

Yeah that looks like it, sadly it doesn’t seem to work.

However I must stop here for now because I’m about to head into work and I won’t be home for another 7 hours.

When I get home, I will write you a script that will ensure that this is prevented! What I will do is write a script that will make the banner ad appear after 15 seconds or so (you’ll be able to change it to whatever you wish!)

3 Likes

@Dravin, Thanks so much, really, you have saved me so many times!
Greenreader9

3 Likes

Oh it’s no problem at all! I’m so glad this is working for you!! :grin:

3 Likes

Hey @Greenreader9 try this out:

IEnumerator ShowBannerWhenInitialized() {

while(!Advertisement.isInitialized) 
{
	yield return new WaitForSeconds(0.5f);
	Advertisement.Banner.SetPosition(BannerPosition.BOTTOM_CENTER);
}

yield return new WaitForSeconds(15); //You can change the 15 to whatever number you want
Advertisement.Banner.Show("banner");

}

With this, the game can wait 15 seconds in order to show the ad. Put this into your AdScript. Let me know if it works or if you have questions! Change the number to whatever you wish. I just used 15 for an example.

3 Likes

Great news @Greenreader9 :slight_smile::slightly_smiling_face:

3 Likes

@Dravin, Its AWESOME!!! And it works! Only thing that can be changed (Don’t know if its possible though), is that have the banner ad show, after the video ad is skipped or closed. Let me know if that’s possible (If not (or its that’s too hard to do), that’s ok).
Thanks a lot,
Grennreader9

2 Likes

Yay!! I’m sure you can do this but sadly I am not too sure how to program that. To ensure it doesn’t ever appear during a normal ad (without skipping it of course) is to change the 15 to 30 or something like that

3 Likes