- Home /
This question was
closed Jun 30, 2021 at 08:37 PM by
PapoTheSnek.
Question by
PapoTheSnek · Jun 30, 2021 at 03:15 PM ·
uibuttons
OnMouseOver for multiple buttons.
Hello, how can I use one GameObject for multiple buttons? right now if I hover over one both show text.
onmouse.png
(36.0 kB)
onnousescript.png
(24.9 kB)
Comment
Best Answer
Answer by lvskiprof · Jun 30, 2021 at 07:37 PM
Of course they do, because you are setting both active on any OnMouseOver() event. You should only be enabling the text on the button that the event happened for. The same for OnMouseExit().
I would assume that gameObject is set to the button the event has happened for.