Search Unity

Resolved Mouse scroll not detecting whatsoever

Discussion in 'Input System' started by Winzlo, Jan 9, 2022.

  1. Winzlo

    Winzlo

    Joined:
    Jun 17, 2013
    Posts:
    4
    Hi!
    I have been trying to get my mouse scroll working for a while now, I have tried everything I could find online and yet it never works. I have it set up how I have everything else set up, but the scroll is the only thing not working.
    I've tried setting the action type to both value and pass through as well as the control type to Axis, Any and Vector2 (Changing the ReadValue in the code as needed). I've also changed the binding path to <Mouse>/scroll/y, <Mouse>/scroll/x, and <Mouse>/scroll to no avail. Scroll Code.png
    As of note I am using Unity 2021.2.7f1 and Input System 1.2.0
     
  2. Winzlo

    Winzlo

    Joined:
    Jun 17, 2013
    Posts:
    4
    I wanted to update with the solution, as it turns out InputActions needs to be a singleton pattern as there should only be one in the whole project. So I created a script to manage the InputActions and had all my input related scripts reference the InputActions variable in that script and the problem was gone.