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.
Answer by captainspaceman · Aug 18, 2017 at 12:57 AM
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.
Follow this Question
Related Questions
Way to lock cursor to center and still interact with Worldspace ui 0 Answers
World space canvas buttons are not working? 0 Answers
[SOLVED] GUI Button Rotate animation Unity 5 1 Answer
How can I change the UI button color when clicked 1 Answer
How to do Image Swap with Text Color the with New UI Button Transition? 0 Answers