Search Unity

Question OnPointerEnter/Exit doesn't trigger if the game temporarily loses focus

Discussion in 'UGUI & TextMesh Pro' started by wwu39, Feb 19, 2023.

  1. wwu39

    wwu39

    Joined:
    Nov 21, 2018
    Posts:
    29
    I'm making a custom button that will show/hide some gameobjects when mouse enters/exits. Everything goes fine except that if the mouse move in/out of the area while the game is not focused or in background, OnPointerEnter/Exit does not trigger when the game is back on :(
    So I don't want the button remain "highlight" mode when the mouse isn't in it.
     
    Last edited: Feb 19, 2023