Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mouse Over GUI Element Not Firing Mouse Events for Scene Correctly

Discussion in 'Immediate Mode GUI (IMGUI)' started by Punchbag, Aug 18, 2014.

  1. Punchbag

    Punchbag

    Joined:
    Oct 30, 2012
    Posts:
    48
    Hi all,

    I'm having an issue whereby if my cursor leaves a Game Object's collider or enters another Game Object's collider, then OnMouseExit() gets called absolutely fine, but if I move the cursor over a GUI element then the Game Object's collider's OnMouseExit() doesn't get triggered.

    Even weirder, the OnMouseOver() of the scene object continues to trigger, even if the cursor is nowhere near it while it's sitting on a GUI Element.

    If I then move the cursor off of the GUI Elements and back onto the scene, the scene object's OnMouseOver() stops firing and the OnMouseExit() is fired as expected.

    Is this a known bug or am I doing something terribly wrong?

    Thanks,

    Steve
     
  2. Diabolikal49

    Diabolikal49

    Joined:
    Jun 5, 2013
    Posts:
    1
    Hi Steve,

    I currently am struggling with the same/similar issue. There are options for 'Blocking Objects' and 'Blocking Mask' but I do not understand them completely and documentation is scarce.