currently i'm using application.load() change scenes , works in unity. when built mobile platform , tested it, in 1 scene can't change specific scene.
for example, gameplayscene, levelselectionscene, mainmenu. i'm able change scene mainmenu levelselectionscene , gameplayscene. unknown reason, i'm unable go levelselectionscene gameplayscene while can change scene mainmenu gameplayscene. below sample code button goes levelselectionscene gameplayscene
private void onclick () { debug.log ("clicked"); if (playerprefs.getint("sanguinedifficultyachieved") == 1) { debug.log("entering difficulty"); m_owner.setactive (); } else { debug.log("exiting"); state.current = state.notingame; application.loadlevel(scene.name); } m_owner.close ();
i don't understand why works on unity debugger doesn't work on mobile platforms.
update 1
i tried use numbers instead of strings worked well. still don't understand reason why.
finally got answer. seems scenes collided each other because use scenes asset bundle , added scenes build settings. why when use application.load(int number) works because access scene build settings.
Comments
Post a Comment