Skip to main content

Device State

To get the currently active device, use the below function.

int deviceID = JMRRigManager.Instance.getDeviceID();
// or cast into device type enum
JMRRigManager.DeviceType deviceType = (JMRRigManager.DeviceType) deviceID;

This returns an int which tells the device you are currently running on. It is mapped in an enum as follows.

DeviceTypeValueDevice Name
Editor0Unity Editor
JioHoloboard1JioPrism
JioGlass2JioGlass
JioCardboard3JioDive

JioDive Methods​

MethodDescription
DiveGyroStatusChecks if device is being used

JioGlass Methods​

MethodDescription
Power State ChangeCalled when device proximity value changes

Controller Methods​

Controller & Gamepad MethodDescription
OnConnectedCalled when device is connected
OnDisconnectedCalled when device is disconnected
Controller MethodDescription
OnBatteryUpdateCalled when battery percentage updated
GetBatteryPercentageReturns battery percentage of controller