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.
| DeviceType | Value | Device Name |
|---|---|---|
| Editor | 0 | Unity Editor |
| JioHoloboard | 1 | JioPrism |
| JioGlass | 2 | JioGlass |
| JioCardboard | 3 | JioDive |
JioDive Methods
| Method | Description |
|---|---|
| DiveGyroStatus | Checks if device is being used |
JioGlass Methods
| Method | Description |
|---|---|
| Power State Change | Called when device proximity value changes |
Controller Methods
| Controller & Gamepad Method | Description |
|---|---|
| OnConnected | Called when device is connected |
| OnDisconnected | Called when device is disconnected |
| Controller Method | Description |
|---|---|
| OnBatteryUpdate | Called when battery percentage updated |
| GetBatteryPercentage | Returns battery percentage of controller |