Revmob integration does not work

Hey guys, I am using the following code to integrate Revmob in my project which is attached to my Main Camera:

#pragma strict

import System.Collections.Generic;

private var APP_IDS = new Dictionary.<String, String>();
APP_IDS["Android"] = "#########"; // My media ID from revmob is put here
private var revmob:RevMob;

function Awake() {
    revmob = RevMob.Start(APP_IDS, this.gameObject.name);
    Debug.Log(this.gameObject.name);
}

function Start () {
	 revmob.ShowFullscreen();
	 
}

When I launch the app, I see the following error message in the console:

"NullReferenceException: Object reference not set to an instance of an object
AdsJavscript.Start () (at Assets/AdsJavscript.js:17)
"

And if I start the app on a device, no ads are being displayed. Do you have any idea what the problem could be?

1 Answer

1

First, you have to check if revmob is not null. It seems you are calling ShowFullscreen instance method using a null object.

Then, did you try calling the ad in the onGUI?