Mouse input not registering in windows build

Hi all. I’m getting a recurring issue with mouse and touchscreen input not being registered in windows builds with Unity 2019.1.8f1. Even this simple script wont work, logging spacebar presses but not mouse:

using UnityEngine;

public class TestScript : MonoBehaviour
{
    void Update()
    {
        if(Input.GetKeyDown(KeyCode.Space))
        {
            Debug.LogError("space down!");
        }

        if(Input.GetMouseButtonDown(0))
        {
            Debug.LogError("mouse button down!");
        }
    }
}

Running this in a blank project works fine, but when put on a gameobject in our main project it doesn’t work. Unfortunately it’s an enterprise project and I can’t link specific code, but will answer any questions. This script is on a standalone gameobject however, so I can’t see why it would have problems.

I have run this on multiple machines with a variety of mice. None of the Input methods register the mouse.

We are rendering up to 6 cameras at once, so I wondered if it was related to this:

However when disabling all but the main camera before building the problem persists.

If anyone has a clue why out mice would not be responsive in builds, but fine in the editor please help me out!

Obviusly problem is caused by some other script in your project. For example, this script will not work if game object is disabled.

Thanks for your reply @palex-nx .

The KeyCode.Space check still fires, so this gameobject is fine and the script is running. The specific issue is with Input.GetMouseButtonDown() or Input.GetKey(KeyCode.Mouse0) as neither of these will fire. Putting this line of code in literally any class in the app returns the same result. I personally can’t think of any situation where other scripts would interfere with these Unity functions, which I guess is the question.

alert Alt+Enter to Fullscreen, Then the mouse down can received in my test, How is the problem occur?