- Home /
LoadLevel failed but the level exist in BuildSettings on Android
Hi,
Just wonder if anyone has this issue where LoadLevel complains that the level does not exist in Build Settings?
I have the scene added into build settings but it just does not load on Android. It is fine on editor and iOS build. It did work on android before but i just couldn't figure out what did I change that could make this happen.
Here are the stuff i tried before posting this questioin: 1. Removed all scenes from build settings and just build that one level. It works. 2. Add in a MainMenu scene which has a button to load in Level1 using LoadLevel("Level1"). Failed. 3. Add in MainMenu scene and load Level1 using LoadLevel(1). Failed.
It seems like whenever it tries to load in Level1, it would just fail.
-DL
Answer by dalziel · Feb 26, 2013 at 10:22 AM
This turns out to be caused by split binaries.
Ah, I remember ticking that split binaries box at the same time as setting the api level actually. Thanks for clearing this up.
Did anyone find the solution. I have to use expansion files with my apk but unity can't find my Levels.
Answer by BarryNorthern · Feb 26, 2013 at 09:24 AM
Are you sure you're using the correct Minimum API Level in the Android Build Settings? I had exactly the problem you describe and resolved it by setting the Minimum API Level to Android 2.3.3, which I guess was more compatible with the latest version of the Android SDK that I had downloaded.
NOTE: This is not the solution, see Daziel's answer about Split Binaries
Actually this is IT !
I have tried all the other answers , nothing worked ! I changed the version of the android that i'm building for to 4.0 , and now BOO$$anonymous$$ ! everything works fine , even some other problems i had is now gone !!
Thanks man ! that IS the solution !