Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

Android build not working properly

$
0
0
Hello there, I just finished my game and build it on android and iOS. Everything is working fine on iOS and in the editor but on Android, Scene is not loading after the rewarded ad is successfully finished. I put some code for context. public void Continue(){ Debug.Log(PlayerPrefs.GetInt("GameOverCounter") + name); if (Advertisement.IsReady () && PlayerPrefs.GetInt ("AdCounter") == 0) { Advertisement.Show ("rewardedVideo", new ShowOptions () { resultCallback = HandleAdStatus }); } else { //Debug.Log ("Ad Already Played!!"); } } private void HandleAdStatus(ShowResult res) { switch (res) { case ShowResult.Finished: PlayerPrefs.SetInt("isAdWatched", 1); LoadPlay("Continue"); break; case ShowResult.Skipped: break; case ShowResult.Failed: break; } } public void LoadPlay(string name){ animPlay = true; Debug.Log (PlayerPrefs.GetInt ("GameOverCounter") + name); Invoke("DelayPlay", 2); Invoke("DelayDestroy", 5); if (PlayerPrefs.GetInt ("GameOverCounter") == 0) { PlayerPrefs.SetInt ("GameOverCounter", PlayerPrefs.GetInt ("GameOverCounter")+1); } else if(name == "Restart"){ PlayerPrefs.SetInt ("AdCounter",0); PlayerPrefs.SetInt ("GameOverCounter", 0); } else { PlayerPrefs.SetInt ("AdCounter",1); PlayerPrefs.SetInt ("GameOverCounter", 1); } } void DelayPlay(){ SceneManager.LoadScene ("Slide Out"); //Destroy (animCube); } void DelayDestroy(){ Destroy (animCube); }

Viewing all articles
Browse latest Browse all 827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>