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
JioDive Usage DetectionChecks if device is being used

JioGlass Methods

MethodDescription
JioGlass Proximity SensorCalled when device proximity value changes

Controller Methods

Controller & Gamepad MethodDescription
Controller Connection EventsCalled when device is connected
Controller Disconnection EventsCalled when device is disconnected
Controller MethodDescription
Battery Update EventsCalled when battery percentage updated
Get Battery PercentageReturns battery percentage of controller