0

In the recent versions of GoogleVR sdk for unity, I have noticed there is no GVRviewermain (to split the view for left and right eye) and also no GVRFPScanvas (to record the FPS). Can anyone please tell me how to achieve the functionalities of these two modules using the current GVR components?

MSD Paul
  • 1,648
  • 3
  • 13
  • 31

1 Answers1

0

You can't split the view for the left and the right eye in recent versions of GoogleVR sdk. But about the FPS you can make World Space Canvas as a child of Camera and put text field in it, set the text field in camera view and attach following scipt to Canvas.

float deltaTime = 0.0f;

public Text textField;

void Update()
{
    float msec = deltaTime * 1000.0f;
    float fps = 1.0f / deltaTime;
    string text = string.Format("{0:0,0} ms ({1:0.} fps)", msec, fps);
    deltaTime += (Time.deltaTime - deltaTime) * 0.1f;

    tekst.text = text;
}
Zarko Ristic
  • 134
  • 4
  • 13