- Home /
 
              This question was 
             closed Apr 05, 2016 at 03:23 PM by 
             Hellium for the following reason: 
             
 
            Unity provides a complete tutorial about making a GUI for VR projects
https://unity3d.com/learn/tutorials/topics/virtual-reality/user-interfaces-vr
 
               Question by 
               maaboo · Apr 04, 2016 at 07:24 AM · 
                guivroculus rift  
              
 
              GUI for VR
What can I use for GUI for VR? I have simple FPS counter like this:
     void OnGUI()
     {
         // Copy the default label skin, change the color and the alignement
         if( style == null ){
             style = new GUIStyle( GUI.skin.label );
             style.normal.textColor = Color.white;
             style.alignment = TextAnchor.MiddleCenter;
         }
 
         GUI.color = updateColor ? color : Color.white;
         startRect = GUI.Window(0, startRect, DoMyWindow, "");
     }
 
     void DoMyWindow(int windowID)
     {
         GUI.Label( new Rect(0, 0, startRect.width, startRect.height), sFPS + " FPS", style );
         if( allowDrag ) GUI.DragWindow(new Rect(0, 0, Screen.width, Screen.height));
     }
 
               but I don't see it in the Rift, only on the display. How to make it working?
               Comment
              
 
               
              Answer by Raresh · Apr 04, 2016 at 07:59 AM
You need to render the canvas in WorldSpace not ScreenSpace. Basically you treat the GUI as an object.