- Home /
Android - touch input causes black screen (except GUI)
I've put my game on my Android phone (Moto G) to test it, and found that when in any gamemode which I have if I try to move the character the screen goes black except for the GUI. This suggests that the camera is destroyed, but I have nothing in my scripts that would cause this. The weirdest thing is that if I just slightly move the character it is fine, but if you hold it down for too long then this problem occurs!
Still very new to Unity and this is my first time developing for Android. If you need to see my scripts as there is no obvious solution just ask.
Are there a lot of scripts? PasteBin them or something, would be the best option.
You are pretty much going to need to find somewhere you can cram in some debugging, to give you a better idea of what's working or not, but this isn't really enough information to go on.
What happens in editor?
@meat5000 In the editor everything seems to work fine, but that's because I can't use any touch input. This whole project I'm working on is a copy of a PC version I originally made with mouse controls swapped with touch ones.
There are six scripts (C#) used. They are simply adaptations of the scripts used for the bug-free PC version. If it is a problem to do with the scripts, it will probably be within either Player_$$anonymous$$ovement or GUIText_Behaviour. The only bug I have is the black-screen.
Here is the PasteBin: http://pastebin.com/p1m4$$anonymous$$9rk
Thanks for your help :)
Forget everything about the code! I have downloaded Unity Remote 4 and played through the editor on that and experience absolutely no bugs, so the code must be correct. The problem appears to be with the Android build itself. $$anonymous$$y $$anonymous$$oto G ion the latest Android build and I have built the game for Android build 4.4W, which I think is the same one. If not, please let me know @meat5000 !
Answer by Arcadewiz · Jul 30, 2014 at 09:53 AM
I do not think it will be easy to understand your issue. Atleast state your objective for touch code where the app is malfunctioning on device perhaps instead of a single touch it is sensing a multiple touch or a different touch phase where your camera seems to go haywire.
Your touch functionality on being tested on device may have a different effect. It could be due to an unhandled condition or exception for the touch functionality if it is not a coding error. Perhaps you have not defined the touch phases clearly in your code.
That's what I can gather from your problem until now. Don't really have much to go on.
I don't expect this comment to lead to a definitive answer from you but using Unity Remote 4 this glitch is not present. Therefore it is not the code but ins$$anonymous$$d the Android build. Are there any obvious things done wrong frequently that can lead to complete malfunctions like this when building for Android? @Arcadewiz