ui Buttons rendered on camera
I've read every single post already asking this question. I have a ui that renders on my camera. The buttons change color when pressed, but don't register clicks. Supposedly something is probably blocking my graphic raycaster. I'm a bit confused about raycasting, but what I understand is that I DO want my UI elements to block the raycaster, in order for the clicks to work. So, I set my graphic raycaster, on my canvas, to blocking objects All, blocking mask UI. I also tried adding canvas groups on the other objects in my canvas, and turning off "block raycaster", but this didn't work either. It is set to use my camera, which is the generic prefab fps. my buttons are on a canvas, I have an Event System. I found this as a debugging tool : if (EventSystem.current.IsPointerOverGameObject ()) { Debug.Log ("left-click over a GUI element!"); } I put it in my button function, but since the button function never activates, it's never called.
Your answer
Follow this Question
Related Questions
UI Button OnClick() Will not Trigger Function Call 0 Answers
C# On Click sound to play before loading scene 0 Answers
Help with buttons 0 Answers
unity 2018.3.12f1 Button OnClick call function on another instance? of script 0 Answers
How can I make mobile UI buttons fire when first touched rather than released? 0 Answers