worldspace ui will only highlight or click when i unlock cursor.

the same OnMouseDown script worked just fine on an object, but when i put it on a worldspace ui button it only works when i unlock the cursor to both highlight and click it. the center of my screen wont act as a cursor.

i just need to know how to click on a worldspace ui button with the center of my screen.

this should be trivial but is causing me a lot of frustration. does unity just suck or am i a total idiot? im considering just making my own ui with glowing animated flat objects because the worldspace ui is totally wack and i hate it with a passion please help.

i had to use Cursor.lockState= CursorLockMode.Confined;

i was confused because with that same script attached to objects the center of my screen was clearly being detected as the cursor. but with worldspace ui i had to set it. very frustrating i wish buttons were a little more intuitive.