简体   繁体   中英

How to prevent the canvas from blocking my clicks?

In my unity scene, I have two different Canvas, one is set on "Screen Space - Overlay", and the other is set on "World Space". I tried using IsPointerOverGameObject to prevent the clicks on the second canvas to go through, but the first one seems to block everything.

Here's my scene

I circled in blue the "World Space" canvas and in red the "Screen Space - Overlay" one. I need to have the blue one stop clicks from going through, but allow the red one to be clicked through.

Thank you.

Just disable the Graphic Raycaster Component and will fix:

在此处输入图像描述

if you have an image component disable raycast target 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM