Search Unity

Collider on GUI

Discussion in 'Immediate Mode GUI (IMGUI)' started by Truls_, Aug 17, 2018.

  1. Truls_

    Truls_

    Joined:
    Dec 4, 2016
    Posts:
    107
    Is it possible to have some sort of collider on the GUI.box? I use a physics raycast to click on objects and when it hits an object a GUI.Box pops up with some information about that object, but if I click on the GUI then I click on whatever is behind the GUI and not the GUI itself.. is there a way to stop this?
     
  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    Are you referring to some GUI in the scene view?

    In that case I would probably Use the mouse down/mouse up event if you're clicking on the gui box.