playMaker

Author Topic: Get XRDevice.refreshRate (or VRDevice.refreshRate) Action  (Read 863 times)

Kubold

  • Full Member
  • ***
  • Posts: 112
Get XRDevice.refreshRate (or VRDevice.refreshRate) Action
« on: September 11, 2022, 07:14:29 AM »
Hi,

I need to get the refresh rate of the user's HMD. I am using the older, built-in Oculus and OpenVR Unity functions ("XR Settings" in the Player tab).

Not sure which function to use, so maybe 2 Actions, one for each and I'll see which one works?

XRDevice.refreshRate:
https://docs.unity3d.com/2019.4/Documentation/ScriptReference/XR.XRDevice-refreshRate.html

VRDevice.refreshRate:
https://docs.unity3d.com/2017.1/Documentation/ScriptReference/VR.VRDevice-refreshRate.html

Thanks!
« Last Edit: September 11, 2022, 07:16:06 AM by Kubold »

Kubold

  • Full Member
  • ***
  • Posts: 112
Re: Get XRDevice.refreshRate (or VRDevice.refreshRate) Action
« Reply #1 on: October 03, 2022, 10:35:43 AM »
I'll just bump it one time, but if it's not doable, that's ok. I tried to convert some other script so it does this, but of course, Unity just displays an error in my 'code'.