OnMouseDown not working with a custom cursor?

So I just finished a script that allowed me to pick up objects, it worked fine. But then I decided to make a custom cursor. I locked my mouse to the center of the screen and hid it. Then made a GUI of a simple dot and centered it on the screen. But now i can’t pick up objects. How would I be able to pick up objects with the mouse locked and hidden? and a GUI on the screen as my “Cursor”?

Sorry if I didn’t explain this well enough, But I would be thankful for any help. Thanks!

This photo might give you a better idea of what im saying, I just want to be able to click and interact with objects with my custom mouse.

[29692-cursor+test.png|29692]

Hello,
There might be serveral issues in here and i’ll try to list some of them and explain how to solve this.

1 OnMouseDown works only with objects that have colliders on them so you need to attach colliders to “clickable” objects,

2 You’ve hide cursor so i think that game would not know it’s position. To solve this you need to lock the cursor where you want it to be and set image of that cursor to what you want,

3 If none of the above helped try to simply create a Raycast from the center of the screen into the depth of Camera and search for certain Tags/Layers.

If still none of those helped just post comment and i’ll post more hints.

Regards,
M.Rogalski