Search Unity

[SOLVED]how to detect when mouse is over GUI panel?

Discussion in 'UGUI & TextMesh Pro' started by swipis, Jan 31, 2016.

  1. swipis

    swipis

    Joined:
    Jan 26, 2016
    Posts:
    12
    hi
    how to detect when mouse is over GUI panel?

    thank you

    EDIT: I think I found a solution - need to use Event Trigger :)
     
    Last edited: Jan 31, 2016
  2. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,689
    You could use an Event Trigger, but I wouldn't recommend it.

    Better you write your own simple script (like you do with colliders) to implement the Event Interface handlers like IPointerEnterHandler and IPointerExitHandler. Event Trigger does the same but is very heavy as it implements ALL events