Home > Back-end >  Is there a way to get IsHighlighted in unity?
Is there a way to get IsHighlighted in unity?

Time:06-25

I thought there is Button.IsHighlighted, but it doesn't exist. I tried EventSystem.current.currentSelectedGameObject (saw on official unity forum), but it doesn't work to. What should I do?

CodePudding user response:

Don't think there is some out-of-the-box property for this, but you can handle this situation using OnPointEnter and OnPointExit methods

CodePudding user response:

Morion was right, there is OnPointerEnter. But i have to add IPointerEnterHandler

  • Related