Childs OnPointerEnter blocked by parent

I have the issue, that some child OnPointerEnter events are blocked by the parents OnPointerEnter event.

Thats the layout I use:

Red
_| Orange
_______|_Yellow

Now, if I move the cursor over red, the red function is called, as it should be.
If I move the cursor over yellow, the yellow function is called, as it should be.
If I move the cursor over orange, the red function is called, thats wrong.

Same I have with OnPointerDown or any other event attached to red, even when the cursor is over none color. Red’s size is that small, I checked that. But the events are randomly called from other or none elements that are a child or subchild of it.

My whole project stand still because of that UI-Event mess.
What can I do?

@Ambrose998800

Hi there, someone else might be able to explain what is going on or if there is possibly a problematic setup…

I can’t tell you that, but at least you get more info about your hit object using Raycast all:

https://docs.unity3d.com/ScriptReference/EventSystems.EventSystem.RaycastAll.html

Raycast on your click location, iterate / check the array generated, it gives you UI items starting from item closest to camera.

EDIT: this way you can decide what is going on or just use this info to selectively trigger some event.