Applovin Unity3d integration

2.4k views Asked by At

I have an issue with integration - AppLovin banners and interstitials are not showing. I'm using Unity 4.3, followed all the instructions in the manual, include google play services, set up sdk key, but it doesn't seems to work.

Here it is my script attached to the gameObject:

using UnityEngine;
using System.Collections;
public class Main : MonoBehaviour {
    void Awake () {
        AppLovin.InitializeSdk ();
        //AppLovin.PreloadInterstitial();
        AppLovin.SetUnityAdListener("ApplovinListener");
    }

    void Update () {
        if (Input.GetMouseButtonDown (0)) {
            AppLovin.ShowAd();
            //AppLovin.ShowInterstitial();
        }

    }
}

Recieved events on application load:

DISPLAYEDBANNER
DISPLAYEDBANNER
LOADFAILED

And no banner shown on click... With interstitals - the same problem

What's I'm doing wrong?

1

There are 1 answers

1
Krzysztof Bociurko On

I'm guessing that you're developing on a mobile platform, did you check this on a device, or just in the editor? Some plugins require testing on devices and will not work in the editor.

If you're running this on a device, try these two things:

  1. don't use GetMouseButtonDown, it should work, but in some configurations it won't. Unless you are one of the two people that connect a mouse to an android device, you have a touchscreen, try if(Input.touchCount > 0) ...

  2. Assuming android - check the contents of adb logcat, that's the log for the whole system. Quite possibly, you will have a more precise error message there. On iOS you have the console in XCode.