UI Panel should block interactions with 3D

Ask for help and post bugs.

UI Panel should block interactions with 3D

Postby barliesque » Mon Feb 06, 2017 3:09 am

I've been through a number of posts on the subject of layering, but still can't seem to make this work.

As a test, I'm using the Checkers example -- I've added a UI Camera to the scene and set the canvas to Screen Space Camera; I've then added a black background behind the Panel containing the instructions. The effect I'm after is that a touch that begins on that panel should not be able to rotate the checkerboard.

I've tried a variety of layer types and rearrangements in the TouchManager, but nothing seems to work as intended. How would you set it up?
barliesque
 
Posts: 3
Joined: Mon Feb 06, 2017 3:03 am

Re: UI Panel should block interactions with 3D

Postby barliesque » Mon Feb 06, 2017 7:47 pm

I should also mention I'm using the version currently available via the Unity Asset Store: v8.2
barliesque
 
Posts: 3
Joined: Mon Feb 06, 2017 3:03 am

Re: UI Panel should block interactions with 3D

Postby barliesque » Mon Feb 06, 2017 8:06 pm

Ah ha! Solved it!
All that was needed was a Graphic Raycaster component on the Canvas.
barliesque
 
Posts: 3
Joined: Mon Feb 06, 2017 3:03 am

Re: UI Panel should block interactions with 3D

Postby archer3cl » Mon Aug 28, 2017 3:16 am

Could you explain in detail what did yo do? I already have a Graphic Raycaster component in my canvas but is not blocking the events.
In my case a I have 2 layers Standard and Full Screen
archer3cl
 
Posts: 3
Joined: Fri Aug 25, 2017 11:05 pm

Re: UI Panel should block interactions with 3D

Postby valyard » Wed Aug 30, 2017 1:03 pm

StandardLayer should trigger UI first before checking world objects. Make sure that the UI objects are interactable and the canvas has GraphicRaycaster component.
valyard
Site Admin
 
Posts: 435
Joined: Mon Sep 08, 2014 11:57 pm


Return to Help and Bugs

Who is online

Users browsing this forum: No registered users and 1 guest