Search Unity

GUI Group and Mouse Over

Discussion in 'Immediate Mode GUI (IMGUI)' started by yangmeng, Jul 26, 2008.

  1. yangmeng

    yangmeng

    Joined:
    Dec 5, 2006
    Posts:
    573
    I am having trouble with MouseOver events on objects that are children of the camera being blocked by my GUI. The GUI script is on an object in an Ignore Raycast layer.
    If I use:

    Code (csharp):
    1. GUI.BeginGroup (Rect (0,0,Screen.width,Screen.height), "");
    2.  
    I get no MouseOver results.

    If I use:

    Code (csharp):
    1.  
    2.         GUI.BeginGroup (Rect (0,0,200,200), "");
    I get MouseOver results everywhere but that 200 by 200 rectangle.

    Is there a way to get the GUI group itself to ignore raycast?
     
  2. yangmeng

    yangmeng

    Joined:
    Dec 5, 2006
    Posts:
    573
    Hmm. Sorry to bump this, but I am running into this problem in more than one project. Can anyone tell me how to prevent the GUI from blocking mouse events in the game scene?