How to hide AdDuplex banner ad control in Unity.

Follow

This is a simple example on how to hide or show AdDuplex banner ad control in Unity.

• Firstly, add two scripts in Unity: ButtonScript and Interop

• After you got these, you need to add the ButtonScript to your button and select HideBannerAd() event on the On Click () event in Unity.

• Now if you got AdDuplex already implemented in your project, you will only need to name your ad control like this: AdControl link

• In the MainPage.xaml.cs add a method that will show or hide the banner ad: Method link

• And we now may attach to the HideBannerEvent like that: 

Interop.HideBannerEvent += Interop_HideBannerEvent;

• Visual Studio will generate a method for us and we'll call our created HideOrShow method from it: Method link

That way your button click should toggle AdDuplex ad control's Visibility.

Have more questions? Submit a request

Comments

Powered by Zendesk