- Home /
Why is my build working on Unity but doesn't work on android?
i am working on a project. it has been going fine. i am at the last stages of polishing my game. all is well when i am testing it on UNITY, however, when i make a build and hit play it doesn't run my scripts on that particular scene. to make things worst, it doesn't report any error on my development build. it's like it doesn't respond at all. am i missing something?
There are a lot of things to check, it's better you to check your scripts separately for Android. (for example: mono evaluation does not work on android, other net libraries also may not work)
thanks for the response. further analysis gave me a hypothesis that it's not the scripts. they are really simple and has worked well the other day. i think it's the NGUI that i am using. the scripts that are not working are attached to them. i tried transferring the scripts to other gameobjects aside from NGUI and they work...it seems that compiling them deactivates the NGUI or something... does anyone know why this is?
Use adb logcat
to get the crash report from your device.
i tried making a standalone build. same problem. on the development console it says: "NullReferenceException: Object reference not set to an instance of an object."...the object being NGUI and i am not instantiating it. it's already on the scene. and it says that to every line of code in the scripts attached to the NGUIs
thank you for all your responses! it really helped me think out of my box. hehe...it's working now! ...sort of. i changed every NGUI that i have, delete the old one and placed the scripts on a separate gameobject. i just assigned the gameobjects i use on the script. my only problem now is that the buttons are not working. but i'll get to that later. thanks again! ^_^
Answer by Ahisical · Feb 28, 2013 at 04:18 PM
Check it out on blue stacks first, so that you make sure that your phone is not the problem.
thanks! i tested it on other phones as well. same problem, though.
Your answer
Follow this Question
Related Questions
NGUI buttons stop responding after game loses and regains focus, on Android Galaxy Tab 2 1 Answer
Please help with scroll 0 Answers
how to access and modify my existing database made by DB browser for SQLite in unity after build 0 Answers
NGUI objects black color after build into phone 1 Answer
Android version won't load when I remove/reduce texture in scene 0 Answers