Dialogue Bark UI on top layer

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
JeremyLullaby
Posts: 11
Joined: Fri Jun 21, 2019 7:57 pm

Dialogue Bark UI on top layer

Post by JeremyLullaby »

I'm attempting to use the DS standard bark ui alongside adventure creator hotspot interactions and I'm struggling with rendering the bark ui on the top-most layer. Essentially the scene has many interaction points the player investigates, but the bark UI clips into the world objects.

I've tried creating a standalone UI camera as a child to the Main cam, and the render type to 'overlay' as well as placing the ui object canvases on a new sorting layer, but no luck. I'm not nearly familiar enough with how things are rendered, clearly.

Is there any solution you're familiar with that you can share with me? Or am I approaching this the wrong way?

Using Unity 2022.3.4f1 - URP.
Thanks so much.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Bark UI on top layer

Post by Tony Li »

Hi,

Please see this post. It's for BiRP, not URP, but the same idea applies. Make sure you've set your camera layering for URP.

If you're using a screen space canvas, see this post. It's for BiRP again, not URP, but the same idea applies.
JeremyLullaby
Posts: 11
Joined: Fri Jun 21, 2019 7:57 pm

Re: Dialogue Bark UI on top layer

Post by JeremyLullaby »

Ah, yeah I managed to get it working after I wrapped my head around the component differences between BiRP and URP camera components.

For reference:
- Each scene NPC/inspection point triggers a DS bark with the NPC/inspection point assigned as the "Actor" transform.
- The NPC/inspection point has a bark ui object as a child set to the UI layer, World space render mode, and the Main Camera as the event camera.
- The Main Camera has a child camera object called UI camera set to Overlay and culling mask to UI exclusively.
- 'UI' was unchecked from the Main Camera's Culling mask, and the UI camera was added to the "Stack" camera list.

The bark ui was a little small in testing, so I needed to adjust the Field of View of the UI camera until it fit right (exactly half the Main Cam's fov in my case), and now everything renders as the top-most layer correctly.

Thanks again for the quick support and helpful instructions.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Bark UI on top layer

Post by Tony Li »

Thanks for posting your solution! It'll help other URP users in the future.
Post Reply