Interstitial and Banner configuration

Add Prefab in the first scene


Unlike previous versions, you should now add our Tappx Prefab in the first Scene you have on your Scenes list in Build Settings (this prefab will remain intact during loading of successive Scenes) from our APP.

Drag the prefab from the Project window and drop it on the Hierarchy window as shown below:

Add your APP’s KEY


On the Tappx page you will find the KEY required for your application. Remember that you will need one for each platform, i.e. if your game / app has Android and iOS version you will need both.

Open the Tappx Main Menu and press Edit Settings:

Here you should enter your KEYS that were provided by Tappx.

Scene Manager Configuration


To configure your APP to show Banner and / or Interstitials you only need to indicate that in the new Scenes manager.

In each scene of your project you will find the option corresponding to Banner and Interstitial, select the one you want (or both). Next, you will see the option to position the Banner in TOP or BOTTOM and for Interstitial you will have the choice to Auto Show.

In case you want to display MREC banners (size 300x250) you only have to indicate within Banner the option MREC size.

Banners and interstitial configuration without Scene Manager


If you want to do without the Scene Manager as shown above, you should manage your advertising by code.

Interstitial

For Interstitials use the following functions:

TappxManagerUnity.instance.loadInterstitial(bool autoShow);

To activate the Interstitial automatically as soon as it is loaded, you should pass a "true" to the parameter "loadInterstitial (bool autoShow)".

In case you want to pre-load an interstitial you have to call the function "loadInterstitial (bool autoShow)" and pass the parameter "false" at the beginning of your scene.

When you want to show the interstitial, you’ll have to check if you have the interstitial ready by calling the function "isInterstitialReady ()". It will return "true" if you have an interstitial and a false if not. If you receive "true" you can call the " InterstitialShow ()" function. Example of use:

if(TappxManagerUnity.instance.isInterstitialReady()){
 TappxManagerUnity.instance.interstitialShow();
}

You can use these functions to show and hide a Banner:

TappxManagerUnity.instance.show(POSITION_BANNER pos, bool mrec);

The first parameter "POSITION_BANNER pos" accepts the following values:

  • TappxSettings.POSITION_BANNER.BOTTOM
  • TappxSettings.POSITION_BANNER.TOP

The second parameter "bool mrec" can be sent as true in case you want to receive an MREC ad (300x250).

TappxManagerUnity.instance.hide();

With these functions you can display a Banner and hide it when necessary.

Interstitial Events


Information of the different events for the interstitials.

Android iOS Explanation
function void InterstitialLoaded(){} function void tappxInterstitialDidReceiveAd(){} It will be called when the creative has been correctly received.
function void InterstitialFailedToLoad(string error){} function void tappxInterstitialFailedToLoad(string error){} It will be called when there is an error while receiving the creative.
function void InterstitialLeftApplication(){} function void interstitialWillLeaveApplication(){} This method is called when the selected creative calls another application.

Banner Events


Information of the different events for the Banners.

Android iOS Explanation
function void OnAdLoaded(){} function void tappxBannerDidReceiveAd(){} It will be called when the creative has been correctly received.
function void OnAdFailedToLoad(string error){} function void tappxBannerFailedToLoad(string error){} It will be called when there is an error while receiving the creative.
function void OnAdLeftApplication(){} function void tappxViewWillLeaveApplication(){} This method is called when the selected creative calls another application.

Test Mode


Before publishing your APP you can run tests by activating the Test mode. This way you’ll receive Test ads for the formats that are going to be set up.

Activating the test mode is very simple: in the TappxSettings select the Test Mode.

IMPORTANT: Be sure to disable Test mode when you finish testing, since if you publish in this mode you will not receive valid ads.


Tappx © 2020