InputSystem no UI Events while Time.timeScale =0
I'm using the new InputSystem (and boy is it documented poorly). I finally got my UI to work after I discovered (since it was not hinted at, warned, or tutorialized anywhere) that I needed to hook my PlayerInput script up to my EventSystem so that I could actually get UI events in the editor.
The really weird thing is now (only in the editor so far) I cannot unpause the game when it is paused. It is like the UI freezes up. Before I fixed my PlayerInput problem, the UI was working just fine on Android and iOS. I have not done a build since this latest change, so I have no idea if it is still working in build, but for the editor, no dice.
I wonder if it has something to do with TouchEmulation...
Answer by CCrowell · Apr 27 at 11:53 PM
Weird discovery: I am enabling TouchSimulation from script via the call TouchSimulation.Enable();
When playtesting, I had to enable 'Simulate Touch Input From Mouse or Pen' via the Input Debugger window, and then disable it. This got the system working, but only while in play mode. I then added a TouchSimulation script to an empty game object, tried again, and got some errors about trying to read touch input before something was assigned. I then removed the TouchSimulation script from the scene, hit play, and everything worked just fine and dandy.
This is why you don't use Singleton patterns, kids.
Oh nevermind, after loading another scene and back into the scene I was testing, we were back to the original issue.
Your answer
Follow this Question
Related Questions
Make Standalone Input Module ignore mouse input? 2 Answers
Porting to mobile how to assign input manager axes to GUIButtons. 0 Answers
What can i change here to have mobile UI button input? 0 Answers
Control UI Input Field entirely with code? 1 Answer
Block Input.GetMouseButtonDown() when clicking on UI element 2 Answers