Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    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,273
  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:
    367
    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:
    367
    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:
    367
    We were able to reproduce and we have a thread open with Valve about this issue. Will post here when we have a resolution.