Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: footman on January 25, 2017, 07:59:48 AM
-
I have an application that want to convert it into Occlus VR, but when I try to put VRInput into NGUI, I met so many problems. So does NGUI support VR? Or is there any example showing how to use it?
Thanks
-
You can always render your UI into a render texture and then use it accordingly, depending on your VR environment. Just rending the regular 2D NGUI camera won't work in VR. If you put your UI into a render texture you can render it any way you want.
-
You need to use a 3D UI instead of a 2D UI. NGUI just creates renderable objects -- so if they're in 3D space, it will work as expected.
-
Thank you, I have used render texture to see the UIs in VR,but cannot receive the input by TouchPad in GearVR. The Samples for Occlus SDK is only for GUI in Unity, not for NGUI. How NGUI got the input from OVRInput?
-
You need to create a custom controller type. NGUI's control sources are all set up as delegates in UICamera. Look for UICamera.onCustomInput. You can also overwrite UICamera.GetTouch, GetMouse, and all the other input delegates with your own.