Hi,
I'm new to Chartboost and I create my first Test Ad and the ad showing correctly but I have one strange behavior. Let me explaine first my scenes in my game. I create little game for android. It's memory match up game. Scenes are:
1.Main Screen
2.Game Rules
3.Choose Game
4-10. Levels of Game
Test Ad works correctly, it's showing and when I tap on "X" ad is closing so Ad works great but in each of scenes(2-10) when I tap back button on my android device my game is shutting down but it's don't need to be shutting down, its need to load specificly scene in my game. Only when player is on Main Screen and tap back button game must shut down. And without all chartboost stuff(plugin and code) everything works like it's must, like I wanted to work. Test Ad is Static Interstitial and this strange behavior happens every time when Test Ad show(popup). I don't know do I need to put something in my code from chartboost API when another scene is loaded with back button on android device.Or do I need to change something in manifest. Only that I do is follow steps on chartboost website for unity integration and that is I import chartboost plugin, insert APP ID and AP Signature in Chartboost->Edit Settings,put chartboost prefab on my first level Main Screen and call ad in script. I will show you my code so that you can see, maybe I do it something wrong.
Fisrt Level: Main Screen
Script (Relevanted)
using ChartboostSDK;
void Start()
{
Chartboost.showInterstitial (CBLocation.Default);
}
//When player tap back button on android device
if (Input.GetKey(KeyCode.Escape))
{
//Game is shutting down. Works OK.
Application.Quit();
}
Second Level.Game Rules
Script (Relevanted)
//When player tap back button on android device(But my game is shutting down)
if (Input.GetKey(KeyCode.Escape))
{
//Need to load Main Screen level(But my game is shutting down)
Application.LoadLevel ("MainScreen");
}
And on other scenes I have same code to load level in Unity but in all cases when I tap back button on my device to load level that I want(3 times is Main Screen, 1 time is Game Rules and 1 time is Choose Game), level is not load(not showing) instead my game is shutting down.
I was send email to charboost support before 6 hours ago but they did not answer yet. Sory for my english.
↧