Forum Discussion
bakno
12 years agoExplorer
OnGUI Fix Please
We have made an Oculus version of our Motorbike game, and it plays awesome : )
The user interface is made with OnGUI controls which cannot be rendered separately within Unity.
I assume the solution has to be worked out with Unity. It is necessary that the OnGUI controls get rendered into a RenderTexture not the screen directly.
If anyone has a solution, please share it. There seems to be many other developers with the same problem.
Regards
Andres
The user interface is made with OnGUI controls which cannot be rendered separately within Unity.
I assume the solution has to be worked out with Unity. It is necessary that the OnGUI controls get rendered into a RenderTexture not the screen directly.
If anyone has a solution, please share it. There seems to be many other developers with the same problem.
Regards
Andres
14 Replies
Replies have been turned off for this discussion
- GoesTo11ProtegeBefore 4.6, I was using render textures. Now I'm using the world space canvases in 4.6 and later (I'm using 5). It works great.
- vrdavebOculus StaffThe new 4.6 UI is probably your best bet. But if you absolutely need to use OnGUI, have a look at how we do OVRMainMenu. It renders to a texture and puts that on a quad in front of the user. Unfortunately, it causes rendering artifacts if you use deferred lighting because we set RenderTexture.active in the OnGUI callback.
- khos85Explorer
"vrdaveb" wrote:
The new 4.6 UI is probably your best bet. But if you absolutely need to use OnGUI, have a look at how we do OVRMainMenu. It renders to a texture and puts that on a quad in front of the user. Unfortunately, it causes rendering artifacts if you use deferred lighting because we set RenderTexture.active in the OnGUI callback.
4.6 is not support with Unity free as far I as I understand, would OVRMainMenu that renders to a texture work in the Unity Free version? - khos85ExplorerWould creating 3d text / objects with mouseover scripts on each be an option as a menu in Unity Free? Would that work?
- GoesTo11Protege
"khos85" wrote:
"vrdaveb" wrote:
The new 4.6 UI is probably your best bet. But if you absolutely need to use OnGUI, have a look at how we do OVRMainMenu. It renders to a texture and puts that on a quad in front of the user. Unfortunately, it causes rendering artifacts if you use deferred lighting because we set RenderTexture.active in the OnGUI callback.
4.6 is not support with Unity free as far I as I understand, would OVRMainMenu that renders to a texture work in the Unity Free version?
Do you mean that you don't have access to 4.6 as a free user or that the Rift doesn't work with the free version of 4.6 yet? I know that 5 beta is only available for subscribers or preorders, I wasn't sure about 4.6. Anyway, they just released release candidate 1 for 4.6 so rift support should be in it and it shouldn't be too long of a wait before 4.6 final is released. - khos85Explorer
"GoesTo11" wrote:
"khos85" wrote:
"vrdaveb" wrote:
The new 4.6 UI is probably your best bet. But if you absolutely need to use OnGUI, have a look at how we do OVRMainMenu. It renders to a texture and puts that on a quad in front of the user. Unfortunately, it causes rendering artifacts if you use deferred lighting because we set RenderTexture.active in the OnGUI callback.
4.6 is not support with Unity free as far I as I understand, would OVRMainMenu that renders to a texture work in the Unity Free version?
Do you mean that you don't have access to 4.6 as a free user or that the Rift doesn't work with the free version of 4.6 yet? I know that 5 beta is only available for subscribers or preorders, I wasn't sure about 4.6. Anyway, they just released release candidate 1 for 4.6 so rift support should be in it and it shouldn't be too long of a wait before 4.6 final is released.
Hi, I'd love to go to 4.6 (to use new UI stuff) but can you show me where it states that Oculus Rift is supported in the 4.6 Free version? I do not think it is supported yet...please prove me wrong. - GoesTo11Protege
"khos85" wrote:
...please prove me wrong.
I'm not going to prove it to you since I really don't care that much. I don't see why 4.5 would have support and 4.6 wouldn't. I would think that 4.6 release candidate would be feature complete. It wouldn't take much for you to try it out to see. - baknoExplorerAfter some research, we found it is possible to make OnGUI to render into a RenderTexture.
Just call RenderTexture.active = YourRenderTexture before the OnGUICommands.
Because of the usage of RenderTexture, this only works on Unity Pro. - khos85Explorer
"GoesTo11" wrote:
"khos85" wrote:
...please prove me wrong.
I'm not going to prove it to you since I really don't care that much. I don't see why 4.5 would have support and 4.6 wouldn't. I would think that 4.6 release candidate would be feature complete. It wouldn't take much for you to try it out to see.
Anyway..I had 4.6 installed and imported the 043 sdk imported, nothing worked, then got told by the moderators here that only 4.5.5 works at the moment, I rolled back to that version and works well.. except the gui stuff :(. - drashHeroic Explorer
"khos85" wrote:
Anyway..I had 4.6 installed and imported the 043 sdk imported, nothing worked, then got told by the moderators here that only 4.5.5 works at the moment, I rolled back to that version and works well.. except the gui stuff :(.
This is because that particular build of 4.6 beta you tried hadn't caught up with the most recent changes in 4.5.5 yet. I thought I heard that 4.6 is caught up now (to include free Rift development), but I'm not exactly sure which builds are equivalent.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 5 months ago
- 26 days ago