- Home /
Level Loads properly in the editor but in the device builds when game is installed on machine. game quits instead of loading level
I am making a game, in which i displayed levels which are locked and the unlocked level is the first one. Now I am in a very strange problem. when I click on a level it loads perfectly in unity editor. but when I build this game on a real device. Instead of launching level(the splash and category selection scenes are working fine here too) the game stops. not ANR etc , it just stops like I tapped the back button on my device. what could be the problem? It's driving me crazy. How can I figure out my problem when it's working fine in the editor? but when I deploy it. it is just sucking my life :(
Try adding this method to a c# script and add it to a gameobject in the scene. This way you can check if you are unintentionally exiting your application
void OnApplicationQuit() {
Debug.Log("Do you really want to quit?");
if (!allowQuitting)
Application.CancelQuit();
}
It's not working for me Simon. It helped though as the PC & $$anonymous$$ac build is working fine now. but the Android Build is still facing the same issue. Can you guess what could be the problem?
Answer by nicolasjr · Apr 14, 2014 at 02:25 PM
It's possible that you're facing a memory problem. It happens a lot with games with lots of textures or so, that the game loads the textures and than can't handle them all and crashes.
Mobile devices can't handle as well as a computer a lot of textures, since it's memory is lower.
You probably should check if you're unloading your textures from previous scenes, if you create pointers to get textures, you have to set those pointers to null when changing level, and etc.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Default Cursor hourglass during app load 2 Answers
scene loader issue 0 Answers