#Godot 4.3: UI not rendering in 3D env(just gray)

1 messages · Page 1 of 1 (latest)

haughty briar
#

Hi, everyone. I'm new to Godot and I'm trying to put the UI in 3D environment. I want to render UI(the one in 2D scene) i got it from Dialogue Node into the 3D env.

I have created a OpenXRCompositonalLayer(where I want the dialogue to be displayed) and a subviewportcontainer to put the UI into the layer. However, when I looked at the main scene, it seems like its being rendered(2nd screenshot) but when I played the scene in headset, its just completely gray. I have tried to change the options in Render Target, Viewport from the inspector and nothing seems to work. I have also noticed that the dialogue was showing in the subviewport but its showing nothing on the 2D scene(1st screenshot). Any feedback would be appreciated! Thank you.

#

Godot 4.3: UI not rendering in 3D env(just gray)

silk trench
#

Is there an specific reason for using a SubViewport?
A CanvasLayer should work.

haughty briar
#

I tried to use CanvasLayer only in main scene but nothing shows up

silk trench
#

Maybe VR is different, i never used it so idk what else it could be tbh.

haughty briar
#

Another noob question, if I were to do that in normal 3D scene, is adding UI into canvaslayer is enough or i still need to add camera or other things for it to be shown in 3D scene?