- Home /
RevMob Integration Not Working
I imported the package.
Then I re-wrote the xml file.
Then I attached this script to the main camera.
import System.Collections.Generic;
private var APP_IDS = new Dictionary.<String, String>();
APP_IDS["Android"] = "52db16f3e9e63d7009000004";
APP_IDS["IOS"] = "copy your iOS RevMob App ID here";
private var revmob:RevMob;
function Awake() {
revmob = RevMob.Start(APP_IDS, gameObject.name);
}
function Start(){
revmob.ShowFullscreen();
}
And it isn't working... I get a NullReference error in the start function. why?
Did you ever figure this out? I'm having a very similar issue. Just won't work, but it's supposed to be a quick process
Answer by sozeray · Mar 23, 2014 at 06:39 PM
I had this problem. Solved it by creating an empty gameobject and attaching this code (below) to it:
private var APP_IDS = new Dictionary.<String, String>();
private var revmob : RevMob;
function Awake() {
APP_IDS["Android"] = "LÖL";
APP_IDS["IOS"] = "QWERTYUIOP";
revmob = RevMob.Start(APP_IDS, this.gameObject.name);
}
function Start () {
revmob.ShowFullscreen();
}
Answer by BCGray00 · May 18, 2014 at 11:18 AM
The NullReferenceException doesn't matter. Build onto the device and make sure the minimum click bid isnt too high - Learnt the hard way!
Answer by Eklavyaa · Jun 25, 2014 at 11:41 AM
Make sure You are connected to the device ! You also get Logs about device not connected in Console.
Answer by Kainano · Jul 25, 2015 at 06:21 PM
I had the same problem.
For some reason I couldn't call revmob.ShowFullscreen()
in the Start()
method. Try doing that on Update()
or any other custom method after the Start has already finished.
It must have something to do with how Activities are loaded on the background.
Your answer
Follow this Question
Related Questions
NullReferenceException: Object reference not set to an instance of an object 3 Answers
How to make Headbobber on joystick Android 2 Answers
'GetComponent' is not a member of 'Object'. 2 Answers
Is there a way to scale everything in my game (GUI, text size, etc.) on Android in Javascript? 2 Answers
NullReferenceException help 1 Answer