Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to hide ad Banner ?

Discussion in 'Unity Ads & User Acquisition' started by Paradoks, Aug 25, 2020.

  1. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Hi,
    In my android project i use:
    Code (CSharp):
    1. Advertisement.Banner.Show(bannerAd);
    to show a banner ad, but after i would like to hide it, i could not find a way to do it.
    I tried that with no success.
    Code (CSharp):
    1. Advertisement.Banner.Hide(false);
    Any idea ?
    thanks
     
  2. Unity_Adamski

    Unity_Adamski

    Unity Technologies

    Joined:
    Jul 20, 2020
    Posts:
    110
    You generally shouldn't need to hide the banners. The code you posted above should hide the banner, it's odd that this isn't working. There might be an issue elsewhere in your code.

    I suggest you try calling
    Code (CSharp):
    1. Advertisment.Banner.Hider(true)
    This should definitely remove your banner, if the banner is still not removed when you call this function, it is almost certain there is an issue elsewhere.
     
  3. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    In fact i would like the ads to show when the player is death and to hide when he respawns, i did not find a way to do that.