Can't Get Quest 2 Battery Level using CommonUsages.batteryLevel

Hello,

I’m working on a project using the Oculus Quest 2 in Unity 2019.4.40f1. Currently I am debugging in Windows using a Link Cable and encountered an issue.

I am unable to get the Battery Level of the device using

bool success = device.TryGetFeatureValue(CommonUsages.batteryLevel, out hmdBatteryLevel))

This results in success = false and hmdBatterlyLevel = 0

However, if I do:

bool success = device.TryGetFeatureValue(CommonUsages.grip, out gripPress))

I get the results - success = true and the out variable shows the grip press levels.

Not sure what I’m doing wrong. Any suggestions will be helpful.

Thanks,

  • Atif

@AtifCognitive I have the same problem. I’m trying to get controller battery level. For HMD this works for me: SystemInfo.batteryLevel