- Home /
Disply ad not calling in Device
So i'm testing to see if the test ad from Chartboost will work on my android device, i build and ran it no ad appeared on my screen. I followed everything from the Chartboost documentation and also enabled test mode on the website. Here is the scripts that uses Chartboost. My question is do you know whats wrong in my scripts thats preventing to call the test ad?
Menu script where i call the interstitial
using UnityEngine;
using System.Collections;
using Chartboost;
public class Menu2 : MonoBehaviour {
private Ray ray;
private RaycastHit rayCastHit;
void Update ()
{
if(Input.GetMouseButtonDown(0))
{
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if(Physics.Raycast(ray, out rayCastHit))
{
if (rayCastHit.transform.name == "PlayButton")
{
Application.LoadLevel("Main Game");
}
}
}
}
void Awake() {
CBBinding.showInterstitial(null);
}
}
And the script where you put everything from the documentation all in one script
using UnityEngine;
using System.Collections;
using Chartboost;
public class Chart : MonoBehaviour {
void OnEnable() {
// Initialize the Chartboost plugin
// Replace these with your own Android app ID and signature from the Chartboost web portal
CBBinding.init("~~HASH~~", "~~HASH~~");
}
void OnApplicationPause(bool paused) {
// Manage Chartboost plugin lifecycle
CBBinding.pause(paused);
}
void OnDisable() {
// Shut down the Chartboost plugin
CBBinding.destroy();
}
public void Update() {
if (Input.GetKeyUp(KeyCode.Escape)) {
if (CBBinding.onBackPressed())
return;
else
Application.Quit();
}
}
}
If your wondering yes they are all on a gameobject not the same object though. If you know the problem it will be great to tell me, thank you!
Hi there - quick suggestion on this: you may want to remove your app ID from your post (that's something you usually want to keep quiet).
I checked with our support $$anonymous$$m and see that you are in their queue! When they solve it for you can you post the answer back here? That will help other devs who may run into the same in the future.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Simple Timer 2 Answers
Stuck on this! Please help me out. 1 Answer
Trying to simply play this animation... Help please. 1 Answer
Native visual scripting? 0 Answers