Quantcast
Channel: Answers for "Catch pointer events by multiple gameObjects"
Browsing all 9 articles
Browse latest View live

Answer by InvincibleCat

Use the layers. You can set the blocking mask directly on your canvas. UPDATE: FOUND THE SOLUTION You need to have your 2 Canvas set to Screen Space Camera and affect the same Camera to the canvas

View Article



Answer by immersiveGamer

What you are looking for is [Physics.RaycastAll][1]. This returns all hits along the ray instead of the first one. Of course this means it returns an array of RaycastHits which you will need to loop...

View Article

Answer by Radetic

It seems like you're trying to do some sort of event bubbling in a sense. What you can do, since the front panel is a child of the back panel, is calling the same method in back panel that is called...

View Article

Answer by InvincibleCat

Use the layers. You can set the blocking mask directly on your canvas. UPDATE: FOUND THE SOLUTION You need to have your 2 Canvas set to Screen Space Camera and affect the same Camera to the canvas

View Article

Answer by immersiveGamer

What you are looking for is [Physics.RaycastAll][1]. This returns all hits along the ray instead of the first one. Of course this means it returns an array of RaycastHits which you will need to loop...

View Article


Answer by Radetic

It seems like you're trying to do some sort of event bubbling in a sense. What you can do, since the front panel is a child of the back panel, is calling the same method in back panel that is called...

View Article

Answer by Stridemann

If someone will read this.. I found solution for me. In my case the event is fired for first layer, then to parent layers, but I need only the first event (for top object), so its easy to filter events...

View Article

Answer by jonaslindberg

This is how I solved passing on any PointerEvent type to the next Raycast-blocking item underneath. It's easy to implement some check for a specific Tag, Component etc. if you have many blocking...

View Article


Answer by bioroid

No one correct solution here, tat's why I add my one: public void OnPointerDown( PointerEventData eventData ) { { if( eventData.used ) // Check mark { return; } eventData.Use(); // Mark object as used...

View Article

Browsing all 9 articles
Browse latest View live




Latest Images