Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ravl87's avatar
ravl87
Honored Guest
11 years ago

Cannot see uGUI elements

Hi again guys,

I am having some issues in trying to display my simple uGUI in the Oculus. I do not want to interact with the elements (buttons and others). I just want to render them on 'screen' for now.

I looked around and found this topic: viewtopic.php?t=16710
Here (like in other posts) it says to make your gui and to set its Canvas Render Mode = World space so here is my setup:

I added a new camera (3rd one) on Center Eye Anchor:
Culling Mask = nothing
Layer = UI
Target Eye = Both

and UI (Canvas)
Render Mode = World Space
Event Camera = CEnterEyeAnchor
Sorting Layer = Default

The object itself (the UI) has Layer set as UI

The problem is that I cannot see any UI when starting the app. Nothing is rendered. Is there something I have done wrong?

2 Replies

Replies have been turned off for this discussion
  • Hi,

    That camera you've added there only exists to raycast for input detection. You need to parent your UI Canvas to the VR Camera (or OVR Camera) game object to see it. (make sure you scale it way down to 0.001 so you see it).

    You may want to read this thread a few posts down:

    viewtopic.php?f=37&t=27468
  • ravl87's avatar
    ravl87
    Honored Guest
    I think I understand now how it works. thanks for the help.

    I only have this issue now. I am still using Overlay because I want my HUD to be displayed only on PC, for now. Any idea why if the Oculus is on all the elements are a little bit darker?

    if I start the build and the Oculus is not on, the hud is correctly displayed :)