Scripting API

Home Scripting API Index Class Overview

com.nolimitscoaster

Class NoLimits


public final class NoLimits
extends Object

Can be used to access the Editor and Simulator API.

This is the main class for accessing further features.

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


FLAG_VRSTATE_LEFT_CONTROLLER

public static final int FLAG_VRSTATE_LEFT_CONTROLLER

Can be used to detect if bit is set in returned value from getVRConnectionState

Set when left motion controller is in use. Use bitwise-and operator (&) with this value to mask the bit.


FLAG_VRSTATE_RIGHT_CONTROLLER

public static final int FLAG_VRSTATE_RIGHT_CONTROLLER

Can be used to detect if bit is set in returned value from getVRConnectionState

Set when right motion controller is in use. Use bitwise-and operator (&) with this value to mask the bit.


FLAG_VRSTATE_VR_MODE

public static final int FLAG_VRSTATE_VR_MODE

Can be used to detect if bit is set in returned value from getVRConnectionState

Set when VR mode is in use. Use bitwise-and operator (&) with this value to mask the bit.


Method Detail


getEditor

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.


getSimulator

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.


getVRConnectionState

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


getVersion

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