- Home /
Game will not load scene on MOBILE, but work fine on PC
Hey guys, I have a pretty crazy issue where the game works perfectly fine on my PC, but when testing on a phone it wont proceed past the start screen. The start game button will not load into a scene as it is supposed to, and just hangs there with the 'pressed' animation doing nothing.
Here is my script attached to my start button
public void LoadRandomLevel()
{
gameObject.GetComponent<SFX>().PlaySound();
Invoke("PickALevel",0.2f);
}
public void PickALevel()
{
int previousScene = 0;
int nextScene;
if(previousScene == 0)
nextScene = Random.Range(0, 2);
else
nextScene = Random.Range(0, 2 - 1);
if(nextScene >= previousScene)
{
nextScene = nextScene + 1;
}
GameObject.FindWithTag("UILayer").SetActive(false);
Application.LoadLevel(0 + nextScene);
previousScene = nextScene;
}
}
I had something similar when building for Android and splitting the AP$$anonymous$$ into a main and expansion file. Does this fit with what you're doing? In my case, the expansion file (which contained everything after the start screen) couldn't load because the program didn't have permission to access the storage where the expansion file was stored.
It is for android, but I haven't split it like you said. It is just one apk.
Your answer
Follow this Question
Related Questions
transform.Translate moves the object too slow in ipad 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to open mobile file browsers 1 Answer
My assets size is 12MB but the game size is 66MB on iphone.. why? 3 Answers