Click on GUI 4.6+ button hits also behind collider OnMouseUp()
Hi, im pretty new to scripting. As the question allready says i have a button and behind it an object with collider and a script with OnMouseUp() on it and i can't figure out a way that when i click on the button that the OnMouseUp() from the object won't be triggered. I tried it with a CanvasGroup on the button and blocking the raycast but it didn't work. Can anybody out there help me ?
EDIT: My setup is a Canvas on a Gameobject with a UI button and behind the button is another object with the OnMouseUp() function which triggers if i only want the button to trigger.
Answer by MacroNerd · Mar 19, 2016 at 01:56 AM
just make a UI button. Much easier to edit and looks nicer.
That's what i meant with 4.6 GUI sry >.< $$anonymous$$y setup is a Canvas on a Gameobject with a UI button and behind the button is another object with the On$$anonymous$$ouseUp() function which triggers if i only want the button to trigger.
Your answer
Follow this Question
Related Questions
Does not contain definition of isTrigger? 1 Answer
Making text appear by pressing a button, only when player is close to the object 1 Answer
UI Button priority over box collider 0 Answers
Why OnMouseUpAsButton just work for one objetc on my project 0 Answers
Make several buttons out of a single image (basic question) 0 Answers