- Home /
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?
Answer by _marshall · Jun 03, 2014 at 05:52 PM
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?
Your answer
Follow this Question
Related Questions
No AD plugins work for me at all - android 1 Answer
RevMob Script Unity 0 Answers
Ads adding problem! 1 Answer
Admob works on an empty project but not on my actual project 0 Answers
Unity Ads not working? 1 Answer