playMaker

Author Topic: Mouse Input disabled on scene load  (Read 3388 times)

BrotherWrong

  • Playmaker Newbie
  • *
  • Posts: 14
Mouse Input disabled on scene load
« on: January 04, 2022, 04:09:10 AM »
   

    Hi all,
    I'm not sure what I did (wrong), but for some reason I lost my entire mouse input. Keyboard input is still working fine. I'm using Playmaker and Unity 2020.3.24f1
    This was working fine before. It stopped working from one day to the other and I cannot for the life of me think of what I might have changed between those two states.

    The original setup:
    I defined an action in the input system for the left mouse button and the space bar. Both are in a "Mouse & Keyboard" Control Scheme with the devices "Keyboard" and "Mouse" set to "Required".
    Both inputs worked fine.

    When I run the Input Debugger it shows the mouse as DISABLED.



    When I go into playmode and force-enable the mouse it still does NOT work and I get no readings in the debugger. When the level is reloaded, I can see that the mouse is disabled on load, so I am assuming that there is something in the initial setup that disables the mouse input.

    Things I've tried:
    - A new scene in the same project doesn't have the issue. Mouse input is working fine on both normal player input as well as UI elements.
    - I then tried creating a new scene and copying over all Game Objects from the problematic scene. No joy.
    - I removed the player input component and created a new one.
    - I removed all other entries from the input system.
    - I removed the Event System and recreated it.
    - I have added another key binding with the same action on the keyboard and that works fine too. So I am sort of ruling out the Input System as the culprit. All other inputs seem to be working.
    - I set up a global transition for MOUSE DOWN as well as UI CLICK on an empty GO, which are never triggered.
    - The only situation where an input seems to be detected is when I query "ANY KEY" to trigger a reload of the scene, but I cannot seem to get a button pressed (and held) signal.

    Any pointers would be greatly appreciated.
     


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Mouse Input disabled on scene load
« Reply #1 on: January 04, 2022, 10:02:01 AM »

BrotherWrong

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Mouse Input disabled on scene load
« Reply #2 on: January 04, 2022, 11:03:45 AM »
Hey,
thanks for your response. This didn't fix it for me though, I'm afraid.
I already replied to the post, hoping for feedback from the OP if they had found a solution.

BrotherWrong

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Mouse Input disabled on scene load
« Reply #3 on: January 12, 2022, 09:20:16 AM »
After hours and hours of debugging, I fixed this by deleting the existing Event System and adding an empty GameObject and adding Input components to that. This automatically created a new Event System as a component. This seems to have fixed the issue. No idea, why it was broken in the first place.

TheBadFeeling

  • Junior Playmaker
  • **
  • Posts: 67
Re: Mouse Input disabled on scene load
« Reply #4 on: May 10, 2023, 12:37:12 PM »
Just a quick note for anyone still struggling with this (I did too):

If you have the "Device Simulator" window open in Unity, you will get NO feedback from your mouse. I looks like it basically just overwrites all mouse input with touch simulation. It took me more than a day to realize this.  :'(

Close the Simulator window and your mouse inputs come straight through.
The Force is with you, young Playmaker – but you are not a C# senpai yet.