Setting Bubbles Render Priority

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
pegassy
Posts: 135
Joined: Sat Mar 17, 2018 8:07 pm

Setting Bubbles Render Priority

Post by pegassy »

Hello,

I noticed that the bubbles are obscured by other objects in the scene (i.e. standing next to a wall). Is there a way for bubbles to show in front of all other objects?

I tried to do this by physically changing their Z values and then making them smaller, but that also causes perspective issues.

Thank you for your help.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting Bubbles Render Priority

Post by Tony Li »

Hi,

The typical way is to create a second camera. You can make it a child of the primary camera so its position aligns perfectly with the primary camera. Remove the UI layer from the primary camera's Culling Mask. Set the second camera's Depth higher than the primary camera, Clear Flags to Depth Only, and Culling Mask to the UI layer. Set the bubble canvas's layer to UI. The second camera will always render objects on the UI layer on top of anything the primary camera renders.
pegassy
Posts: 135
Joined: Sat Mar 17, 2018 8:07 pm

Re: Setting Bubbles Render Priority

Post by pegassy »

Wonderful! Thank you so much.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting Bubbles Render Priority

Post by Tony Li »

Glad to help!
Post Reply