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

Unity UI Child Object not triggering IPointerEnter on parent object

Discussion in 'UGUI & TextMesh Pro' started by Democide, Apr 30, 2019.

  1. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    So, I have an GO with a class that triggeres a hover effect on OnPointerEnter. Now in some cases that GO has a child GO with a class that reacts to OnPointerClick (and thus needs to have visual components with RaycastTarget enabled).

    Now the issue is that the child GOs visuals trigger the OnPointerEnter of the parent GO. I've tried giving the child GO event listeners to overwrite those but it didn't seem to work. Does anyone have any ideas?

    This image might help explain what I have and what I want:

    Untitled-1.png