Unity stops processing input after the second time I press play - Unity 5.1.2f1

This is strange - My gui works correctly the first time through. But after I stop and press play again - it displays, but I can no longer click on anything, and it doesn’t even recognize a hover. I have to completely exit unity and restart to get it to work again. And then it only works the first time. Anyone seen this before?

Wow, this only appears to happen on my work box. Same version of Unity on both machines.

I had that problem, restarting the computer solved it. I think it came back though, but currently I’m on a period of time where the problem does not show up. Weird.

Yeah, I sent in a bug but all I’ve heard back on it so far is crickets. Restarting didn’t work for me, still the same strange behavior. The system is detecting mouse clicks though, because the old Immediate Mode GUI still works just fine. Just the new GUI is dead after the first play through.

This appears to be related to the size (or perhaps aspect ratio) of the game view. If I run with the game view maximized, then everything responds as normal. It’s only when I do not run maximized (with the view around 1200x600 in the center of the editor) does this occur. Some issue with input processing on the Unity UI.

I started getting this again more frequently, so I had another look. (It’s kinda annoying having to restart PC every time this happens.)

The issue is that EventSystem does not seem to get an input module activated. It works for the first time, but after you change scene or exit playmode and run again, it does not work anymore. Select your EventSystem object in inspector and you can see there is no module activated. Workaround is to check “Force Module Active” and the EventSystem immediately picks it up. Yet it fails again when changing scene or running second time. :confused:

EDIT: This is on 5.2.2f1, btw.

3 Likes

OMG I have just hit this same problem. Was working fine all morning. But now I can only run it once before my input just fails and I get “No module” on the EventSystem. OnGUI buttons work fine but the UI buttons fail. I restart Unity with no other changes and it works again - once. I am on the latest and patched 5.3.1p2.

BTW I’d avoid 5.3.1 for a while, there seems to be some fairly basic bugs in it.

You can use my workaround above. To make things easier I made my game force the input module to be active after each scene change (in editor), no problems but still a bit silly to have to do that in the first place. :slight_smile:

No amount of screen size jiggling seemed to help. The reboot of my PC (Windows 7) seemed to fix it for me - for now. Will try your approach if it rears its ugly head again!

I wonder if the bug is still marked open. If not it should be reopened as isn’t fixed ( @Jaimi ).

It will, unfortunately. I’m running Windows 10 and have had the same problem since (at least) 5.1, restarting PC helps but it will come back. :frowning:

Too bad this is a very random problem that is difficult to reproduce. Seems it has something to do with EventSystem losing the input module.

1 Like

Thanks mh114, that worked perfectly

1 Like

I have the exact same problem this morning and i was looking for a solution to fix this bug , thanks @mh114 for your fix, Unity Should fix this bug , it seems that all the UI system stops to work when this bug occur try adding a new gui text element in play mode for exemple and you will notice that the text is not displayed if you have the bug …

1 Like

THANK YOU. You have no idea how long I’ve been suffering with this problem. And because it’s very hard to describe in a google search, I’ve only managed to get to this thread now. Your fix of “Force Module Active” works great.

1 Like

I had the same problem when I tried to run using the version 32-bits. It doesn’t happen with the unity 64-bits.

I’ve had this problem since 5.x (maybe 5.1, or 5.2), always used 64-bit versions.

I’ve got the same problem recently.
I confirm: Sometimes restarting Unity seems to works. Sometimes the system.
To force the module too. But is there any impact on anything to force it ?

Nope, and the bug is in editor only from what I’ve seen. I made my game force the input module on each scene change in the editor, so this doesn’t bother me anymore. That’s not to say I wouldn’t want it to be fixed.

Thanks very much.

1 Like

Super - this fixes it for me too - but annoying to have to do constantly. Thanks man

@ - icanhazfix?

1 Like

So sad ~~ Unity not fix until Unity 5.3.4p6