OnMouse... methods not working in Windows Build

Unity version: 2018.4.25f1

I’m not sure how to proceed since I’m just using the default Unity features for input, and the output_log isn’t providing any info about the discrepancy

In the editor, I am able to use the mouse to navigate the player around (it in the only form of input used by my game). Unity is detecting general mouse movement fine. It’s just the code inside OnMouseDown and OnMouseDrag that aren’t being executed.

If it wasn’t working in the editor, that’d be one thing. Obvious code issue. But what would make a core feature like that not work in the build?

Can you show your code?

Thanks for replying!

void OnMouseDown()
        {
            mZCoord = Camera.main.WorldToScreenPoint(gameObject.transform.position).z;
            mOffset = gameObject.gameObject.transform.position - GetMouseWorldPos();
            Debug.Log("MOUSE DOWN");
        }

        void OnMouseDrag()
        {
            Vector3 newPos = GetMouseWorldPos() + mOffset;
            transform.position = new Vector3(newPos.x, transform.position.y, newPos.z);
            Debug.Log("MOUSE DRAG");
        }

I put in Debug Logs, but nothing showed up in output_log.txt.

I should also point out that I can’t click to close the development console either. Those buttons are completely non-responsive.

Lastly, this happens after I unload a scene and then load 3 scenes additive. When the game first loads, mouse down inputs work fine.

I wonder if it’s something in the UI running off the rails and not processing input

The development console being unresponsive sounds very weird. I assume you verified that this script isn’t destroyed by the time you load those 3 scenes? Is there anything in those scenes that could interfere with input (like loading any plugins, stuff like that)?

This script is one of many that get loaded by the core Game scene (which is one of the 3 scenes).

As for Plugins: nothing over the top: Master Audio, Simple Waypoint System, PlayMaker; those are really the only big plugins I’m using, and I don’t imagine it’d be any of those.

I can try disabling what I can and see if I can find a culprit that way. I’ll report back what I find.