HI all,
can anyone shed some light on this problem that has occurred over last 3-4 days.
Basically what happens is that when I run a game in the editor game window my UI elements stop responding to clicks either on the first scene change or if I stop and restart the program. If I re-import all, or close Unity and reopen it, the UI is responsive again when I next run the program, until the first scene change or when I stop and restart the program.
This is happening on two different PCs, one Windows 7 and one Windows 10, on multiple projects, all of which have been working flawlessly until the last 3 -4 days, and on versions of Unity back to 5.5.2f1 (haven’t tried further back than that.)
I’ve reproduced the problem with a completely clean project, in a fresh installation of Unity 5.2.2f1 where I just added a canvas and a button to two scenes and clicking the buttons should switch back and forth between the scenes. In the editor the problem happens as described above but the program works as it should in a build.
I’m at a complete loss at the moment on what to do to get around this, has anyone else experienced anything similar?
I’ve attached the project files of the simple project that reproduces the problem. If anyone would be kind enough to check it if it does the same for them or not and let me know.
Thanks
2566330–178844–Unity Test.zip (36.3 KB)
1 Like
Have you tried the latest version of unity to see if this is something that has since been fixed?
Yes, it happens in 5.3.4f1, and every version back to 5.2.2f1, I haven’t tried it in anything earlier than that though.
The strange thing is that I’ve used all these versions prior to this with no apparent problems until 3-4 days ago. It’s the fact that it’s occurred on two different PCs that’s really confusing me. The Windows 10 PC is a really clean install too, as I only built it about 10 days ago.
I can reproduce the problem easily, create new project, add canvas and button, run the game, button works, stop the game and run it again, button not working. Restart Unity, or reimport all and button works again, once. The first scene change either in or out of play mode also stops the input system working.
I don’t know what to do 
I can not recreate the problem. What does your log file look like?
Hi Karl,
I suspect it is something specific to my projects, although I still need to figure out what that might be, so that I can correct it and avoid it in future.
I’ve submitted a bug report 782270_62rl540neieh43c6, will this have the log info you want?
In the meantime, I have another freshly installed PC that I’m going to load Unity on but not any of my current projects, and I’ll see how that behaves.
If I’m honest I’m expecting it to be okay, which will still leave me with the problem of finding out what it is in my projects that’s causing the problem and why the problem, once it occurs, persists even in new projects afterwards.
Thanks for taking the time to help.
@karl_jones
I’ve been doing some more detective work and I’ve pinned the problem down to a more specific set of conditions.
It is caused by (at least) one of my apps (but not the one I submitted for the bug report), but only if the app in question is opened while my android phone is plugged into the PC. After that the problem persists for any other project that is opened, until the PC is restarted without the phone plugged in.
Do you have any suggestions as to how I can further pinpoint the problem?
That sounds strange. Maybe try looking at the input module in the inspector to see what it considers the mouse to be over when it won’t accept your clicks.
Do you mean check the x and y position of the mouse as reported by the input module? If so then as far as the input module is concerned the mouse is over the UI elements that aren’t responding.
If you select the EventSystem you should see whats going on in the inspector
Okay, this is definitely strange, first picture is the first run after Unity is loaded, and the buttons work.
The second picture is how it looks any time you run a program after that. Even if you load a different project.
In case it’s significant, the first scene change also kills the input module.
I’ve worked out that the problem only happens if I have my phone plugged into PC when I fire up Unity. If I start Unity first and then plug the phone in I can stop and start the game without any issues.
I’ve no idea what has changed recently to cause this to start happening, it’s only in the last few days I’ve seen it, and I’ve been programming android games on and off for about 2 years and I usually have my phone plugged in the PC whilst programming, to charge it and for testing.
Regardless of the cause, I can at least avoid it happening now, which means I can work again 
That sounds odd. Are you using unity remote to send input from your phone?
No, I’m just sending builds to my phone for testing.
I’ve narrowed it down even further.
If I make a new project and add a canvas, but no other UI elements, then save it, close Unity and reopen it with my phone plugged in, the input module doesn’t display the problem when the program is stopped and re-run.
I can even add a button at this point and the program continues to behave itself.
However, if I then save that project, close Unity and reopen it, then the input module problem occurs.
So it seems that any project that contains a UI button develops the issue once saved.
I’ll test it next with other UI elements and see if it’s just buttons or if anything else can cause it.
As far as I can ascertain it only affects buttons and toggle UI elements.
The project must already contain the UI element when Unity is started, and my phone needs to be plugged in.
If I delete the UI element, the input module problem doesn’t reset even if I close and reopen the project, unless I unplug my phone and then reopen Unity.
I’m now going to try and reproduce this on another PC that has previously never been used for Unity.
Strange. Well if you do manage to recreate it then do file a bug report with the details so we can investigate
I’ve reproduced this on 3 separate PCs now.
To get around the issue I just have to remember to make sure I start Unity and run the program at least once before I plug in my phone, and then it works without any problems.
I’ll file a bug report and post the number here.
1 Like
Bug report filed, Case 786085
I’ve also been getting similar behavior on 5.3.4f1, but I haven’t been able to narrow down why it’s happening. I have no device connected to my machine so I can’t attempt the same fix as Munchy2007. For my project it seems to run fine the first time I play the scene in Unity, then on any subsequent plays of the same scene the UI has stopped responding. The event system starts showing “No module” in the inspector just as you showed in the screenshot above.
At this point no scene I open will have UI that responds to any input, so I have to restart Unity. Restarting generally solves the problem, but sometimes it requires more than 1 restart.
Have you gotten any further info on this bug? I’m not sure how to look up that bug report or if that’s even possible.