Field Summary |
|
static final int |
FLAG_VRSTATE_LEFT_CONTROLLER Can be used to detect if bit is set in returned value from getVRConnectionState |
static final int |
FLAG_VRSTATE_RIGHT_CONTROLLER Can be used to detect if bit is set in returned value from getVRConnectionState |
static final int |
FLAG_VRSTATE_VR_MODE Can be used to detect if bit is set in returned value from getVRConnectionState |
Method Summary |
|
static Editor |
getEditor() Returns the Editor singleton to access the editor API |
static Simulator |
getSimulator() Returns the Simulator singleton to access the simulator API |
static int |
getVRConnectionState() Returns state related to VR mode. |
static int |
getVersion() Returns the application version encoded as 4 values (a.b.c.d). |
Field Detail |
Method Detail |
public static Editor getEditor()
Returns the Editor singleton to access the editor API
Returns null if the application is not in Editor mode
Returns:
Returns a reference to the Editor API or null if not in Editor mode.
public static Simulator getSimulator()
Returns the Simulator singleton to access the simulator API
Returns null if the application is not in Simulator mode
Returns:
Returns a reference to the simulator API or null if not in simulator mode.
public static int getVRConnectionState()
Returns state related to VR mode.
Can be used to detect if in VR mode and if hand motion controllers are in use. Several state flags are encoded as bits in the returned integer. It is recommended to periodically call this method to detect changes properly, such as the user disabling a hand motion controller. Bit 0 indicates if VR mode is active. Bit 1 indicates if left motion controller is in use. Bit 2 indicates if right motion controller is in use. Bits 3...31 are reserved for future and are undefined. Use FLAG_VRSTATE constants for masking the bits using bitwise-and operator.
Returns:
status encoded as bits
Since:
2.6.4.0
public static int getVersion()
Returns the application version encoded as 4 values (a.b.c.d).
Each value is represented by 8 bits. a,b,c,d values can be decoded by bit operations (right shifting with and-mask). Pseudo code: int version = NoLimits.getVersion(); int a = (version >>> 24) & 0xFF; int b = (version >>> 16) & 0xFF; int c = (version >>> 8) & 0xFF; int d = version & 0xFF;
Returns:
version encoded as int
Since:
2.0.5.6