My app works perfectly fine in the editor with no errors and it works exactly how it should. However when I build it onto my android device many aspects of the app are not functioning. Its as if 90% of my functions are not being called at all. The Update Function in my singleton control script wasn’t even being called. Nothing crashes or anything it just does not work. I don’t even know where to start looking as there isn’t actually an error in the script.
Try to add some UI debug messages as we used to do in C with console =)
Just put some informative messages after your initial steps into the code and display it on your UI.
In that case you will be able to better understand what the hell is going on in your android app.
Probably you just didn’t initialized some of the required references and receive an null refference exception in the middle of your script without any notifications. This is usually the thing which could isolate a 90% of your code being normally executed.
One stupid thing that just came to my mind happened to me while was developing an android app which was suppose to consume a web service. It has been working as shine in my AndroidStudio but was totally dead on the real device… After struggling for a couple of days… I just realized of a sudden that it will be a damn good idea to turn an internet on…
Actually I managed to figure it out. It was a problem with my saving and loading system. I had edited values that were to be saved and edited but still saved and loaded to the same .dat file. I guess it just broke the whole app. I just created new ones and it works like a charm.
in my case I had some objects with missing scripts and after removing those missing scripts my issue was resolved.