Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

VRStats.gpuTimeLastFrame is always 0

Discussion in '5.4 Beta' started by TsViCo, Jul 25, 2016.

  1. TsViCo

    TsViCo

    Joined:
    Jul 25, 2016
    Posts:
    4
    Hi,

    we are working on a game for the HTC Vive and using OpenVR in our project. The VRStats.gpuTimeLastFrame float is always zero. We are using the Vive at the PC and can play with it which means that OpenVR is working fine.

    Does anybody else have this problem or is it our fault?

    I will try this with older beta versions of the Unity beta today.

    Edit: It doesn't work with beta 23 either.

    Edit2: Creating a new project didn't help. The value is always 0.

    Greetings

    Tim
     
    Last edited: Jul 25, 2016
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
  3. TsViCo

    TsViCo

    Joined:
    Jul 25, 2016
    Posts:
    4
    No, only the OpenVR SDK should set this value at the moment. The Lab Renderer from Valve in the asset store is using this value. I think they asked unity to implement this in the engine.

    Edit: Just to be clear. It worked a few beta versions ago and is not working at least since beta 23 for us.
     
    Last edited: Jul 25, 2016
  4. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    I can confirm that only OpenVR SDK sets this value right now. It will come to Oculus SDK in the future.

    It worked here with OpenVR SDK on latest 5.4 build. I tried with both the released version of SteamVR and the SteamVR beta version, both are functional.

    FYI, we get this value from here: https://github.com/ValveSoftware/openvr/blob/master/headers/openvr.h#L1936
     
  5. TsViCo

    TsViCo

    Joined:
    Jul 25, 2016
    Posts:
    4
    I tested it in a build. The value is set in the build, but not in the editor. Is this by design or a bug? Because a few beta versions ago the value was also set in the editor and not just in the build only.
     
  6. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    I actually only tried in Editor yesterday, so I can confirm it was working in Editor on 5.4.0f2 on my machine. I'll have QA take a look.
     
  7. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    We were able to reproduce and we have a thread open with Valve about this issue. Will post here when we have a resolution.