cancel
Showing results for 
Search instead for 
Did you mean: 

uGUI (Unity New GUI) and OVR Cam?

yosun
Honored Guest
Has anyone been able to get uGUI (screen overlay) to display on the OVR cam view?
ChallengePost: yosun SMS: 415-77-YOSUN Twitter: @yosun Some old public hacks.
8 REPLIES 8

dignifiedweb
Protege
"yosun" wrote:
Has anyone been able to get uGUI (screen overlay) to display on the OVR cam view?


Have you tried the new UI? The canvas can render in world space. There's a really good forum topic here:
https://forums.oculus.com/viewtopic.php?f=37&t=16710
Check out my Mobile VR Jam 2015 title Man Overboard! - Try the DK2 Version if you don't have a Gear VR

yosun
Honored Guest
Yes, but is there a way to display UI as a screen overlay - instead of world space
ChallengePost: yosun SMS: 415-77-YOSUN Twitter: @yosun Some old public hacks.

dignifiedweb
Protege
I don't think so, but have you tried doing one eye at a time? You could do a screen overlay still in world space really close to camera. Then you parent the canvas to the center eye piece of the OVR Camera? That would work mostly the same too no?
Check out my Mobile VR Jam 2015 title Man Overboard! - Try the DK2 Version if you don't have a Gear VR

yosun
Honored Guest
I guess if that's the only way 😕 - it seems like unnecessary overhead for 2D overlays to have to be 3D gameobjects

Was hoping with the new GUI system that GUI for these platforms would be a lot less hackish in Unity
ChallengePost: yosun SMS: 415-77-YOSUN Twitter: @yosun Some old public hacks.

dignifiedweb
Protege
I was curious to see if screen overlay works at all. It seems like it is possible to get screen overlay to display in stereo view. The way I did it to test was create a canvas with text --> Select "Screen Space - Camera" --> select the LeftEyeAnchor camera. Next, duplicate that Canvas, then select the "RightEyeAnchor" with the duplicate. It follows the camera perfect by the looks of it. Not sure how well it displays though.

Hope that helps. I'm getting so nervous now, that completion date is coming up so soon. Good luck on your Jam. I really like your project by the way! 🙂
Check out my Mobile VR Jam 2015 title Man Overboard! - Try the DK2 Version if you don't have a Gear VR

yosun
Honored Guest
"dignifiedweb" wrote:
I was curious to see if screen overlay works at all. It seems like it is possible to get screen overlay to display in stereo view. The way I did it to test was create a canvas with text --> Select "Screen Space - Camera" --> select the LeftEyeAnchor camera. Next, duplicate that Canvas, then select the "RightEyeAnchor" with the duplicate. It follows the camera perfect by the looks of it. Not sure how well it displays though.

Hope that helps. I'm getting so nervous now, that completion date is coming up so soon. Good luck on your Jam. I really like your project by the way! 🙂


Thanks! (Ah, if only I knew this before converting a whole bunch of UI stuff to Quad's...)

4.6.3+ Screen Space - Camera option in Canvas component

ChallengePost: yosun SMS: 415-77-YOSUN Twitter: @yosun Some old public hacks.

stupidn00b
Explorer
One note if you decide to work with uGUI - be very careful to watch draw calls as you build your UI. uGUI doesn't handle overlapping UI elements nearly as well as the third party UI solutions like NGUI, and it's easy to have a relatively small UI element jump over a dozen draw calls if you have backgrounds, text, animations, etc...

yosun
Honored Guest
"stupidn00b" wrote:
One note if you decide to work with uGUI - be very careful to watch draw calls as you build your UI. uGUI doesn't handle overlapping UI elements nearly as well as the third party UI solutions like NGUI, and it's easy to have a relatively small UI element jump over a dozen draw calls if you have backgrounds, text, animations, etc...



argh, i had thought uGUI > NGUI since they got the same guy who made NGUI to at least start building uGUI

I wonder if anyone has done benchmarks on drawcall and performance for uGUI vs NGUI vs Quad Gameobject's placed in front of camera etc.
ChallengePost: yosun SMS: 415-77-YOSUN Twitter: @yosun Some old public hacks.