- Home /
Game works differently on android
So i have this complete game that works fine on the unity editor. You launch the game, click/tap the Play button, and you enter a scene in which cubes pop up. Now when i build&run it to my galaxy s2 it doesn't work the same, i mean you enter the game, tap play and enter the scene, but the cubes don't pop up and the game just doesn't start. so i put i GUI.Label at the game scene and debuged with it (i programmed it to change text each if it enters) and it doesn't change text. There is also this one if statement that is does enter, so i programmed it to change text when it entered that if statement but it didnt change while the if was still executing. I dont know what to do anymore, it simply ignores my text change line and i'm thinking it also ignores other lines. basically i have not idea whats happening and my code does work in the editor which means it's fine. Has anyone got any suggestions because this problem is just ridiculous.
thank you for reading and sorry for the long text.
Actually your text isn't really long. You have to give us more information. Post the code you used to instantiate the cubes.
here is a link to my code http://pastebin.com/phRvHezn . I've shaved off most of it that does work because it's long and irrelevant to my question. the output i get from it on mobile is this http://s8.postimg.org/qfrc0vvud/Screenshot_2013_07_25_14_09_59.png
but in the editor i get this
Answer by Graham-Dunnett · Jul 25, 2013 at 01:42 PM
The standard way to tackle this kind of thing is to use Debug.Log
statements throughout your code, and then look at the log messages to see which bits of code are executed. On Android you'll need to know about adb logcat
.
Your answer
Follow this Question
Related Questions
The type or namespace name `Editor' could not be found. 8 Answers
Error importing asset from google poly api in android build unity 0 Answers
Script works in editor, but does not work in build (Android) 1 Answer
Change Editor resolution for android devices. 1280x800 not selectable. 4 Answers
Animation stops Recast from working 0 Answers