unity-xr-plugin icon indicating copy to clipboard operation
unity-xr-plugin copied to clipboard

Unity XRStats.TryGetGPUTimeLastFrame() always returns 0

Open Kulgann opened this issue 4 years ago • 5 comments

I'm trying to set up a dynamic resolution script that will decrease the render resolution of the camera based on the gpu frame timings but what ever I try to use to get the gru frame timing is always 0. I tried XRStats.TryGetGPUTimeLastFrame() and OpenVR.Compositor.GetFrameTiming()

Kulgann avatar Oct 26 '20 12:10 Kulgann

Hey @zite , I'm releasing our game in the next 5 days. Anyway I can get the XRStats fix in my version of the plugin before that? Please this would solve most if not all of my optimization issues.

Kulgann avatar Dec 11 '20 12:12 Kulgann

Hi, thanks for reporting the issue. I've added this to the latest release. You're welcome to give it a try and let me know if it solves the problem. https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/v1.1.1b

zite avatar Dec 11 '20 20:12 zite

Hello again @zite, Really sorry to post again on this issue but I'm using the SteamVR unity plugin for input and the Interaction system. Upgrade guide there says to delete all related folders, but sadly I cant do that since I have modified the interaction system to fit my needs ;( . How do you suggest I upgrade just the xr plugin. Adding the tarball from here seems to break input and so on.

Kulgann avatar Dec 17 '20 12:12 Kulgann

you could just import each folder except the interaction system. I don't think we changed that.

zite avatar Dec 18 '20 00:12 zite

Hey, After upgrading to https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.7.1 TryGetGPULastFrame() now reports timing different than 0, however I have to say that they are not correct at all. I'm expecting a frame timing of about 13ms but instead I'm getting about 100+ms on a build and 500+ms in the editor.

Kulgann avatar Jan 04 '21 08:01 Kulgann