Skip to main content
Version: 2.0.0

Haply::Inverse::Unity::DeviceMapper

Manages the mapping and state of devices in the HaplyInverse system.

Inherits from Haply.Inverse.Unity.Singleton< DeviceMapper >, MonoBehaviour

Public Events​

Name
StateDelegateStateChanged()
Event triggered when the state changes.
Action< DeviceMapperState, DeviceMapperState >StateChangedAsync()
Unity event triggered after state changes have been processed.

Public Functions​

Name
delegate voidStateDelegate(DeviceMapperState state, DeviceMapperState previous)
Delegate for handling state changes.
boolIsReady()
Checks if the device mapper is in the 'Ready' state.
Inverse3GetInverse3(uint id)
Retrieves the already mapped Inverse3 instance with the specified device ID.
VerseGripGetVerseGrip(uint id)
Retrieves the already mapped VerseGrip instance with the specified device ID.
GameObjectGetDeviceGameObject(uint id)
Retrieves the GameObject associated with an already mapped device (either Inverse3 or VerseGrip) using the specified device ID.
override stringToString()

Protected Functions​

Name
voidAwake()
voidUpdate()
virtual override voidOnDestroy()

Public Properties​

Name
DeviceMapperStateState
Gets or sets the current state of the device mapper.
Inverse3[]GameObjectsInverse3
VerseGrip[]GameObjectsVerseGrip
ClientConnectionClientConnection

Public Attributes​

Name
UnityEventReady
Unity event triggered when the device mapper is ready.
Dictionary< Inverse3, VerseGrip >inverse3HandleDict

Additional inherited members​

Public Functions inherited from Haply.Inverse.Unity.Singleton< DeviceMapper >

Name
voidInitializeInstance()
Initializes the singleton instance.
boolExists()

Protected Functions inherited from Haply.Inverse.Unity.Singleton< DeviceMapper >

Name
virtual voidOnApplicationQuit()

Public Properties inherited from Haply.Inverse.Unity.Singleton< DeviceMapper >

Name
TInstance
Gets the instance of the singleton class.

Public Events Documentation​

event StateChanged​

StateDelegate StateChanged()

Event triggered when the state changes.

event StateChangedAsync​

Action< DeviceMapperState, DeviceMapperState > StateChangedAsync()

Unity event triggered after state changes have been processed.

Public Functions Documentation​

function StateDelegate​

delegate void StateDelegate(
DeviceMapperState state,
DeviceMapperState previous
)

Delegate for handling state changes.

function IsReady​

bool IsReady()

Checks if the device mapper is in the 'Ready' state.

function GetInverse3​

Inverse3 GetInverse3(
uint id
)

Retrieves the already mapped Inverse3 instance with the specified device ID.

Parameters:

  • id The unique identifier for the Inverse3 device.

Return: The already mapped Inverse3 instance with the matching ID if found; otherwise, null.

function GetVerseGrip​

VerseGrip GetVerseGrip(
uint id
)

Retrieves the already mapped VerseGrip instance with the specified device ID.

Parameters:

  • id The unique identifier for the VerseGrip device.

Return: The already mapped VerseGrip instance with the matching ID if found; otherwise, null.

function GetDeviceGameObject​

GameObject GetDeviceGameObject(
uint id
)

Retrieves the GameObject associated with an already mapped device (either Inverse3 or VerseGrip) using the specified device ID.

Parameters:

  • id The unique identifier for the device.

Return: The GameObject associated with the already mapped device if found; otherwise, null.

function ToString​

override string ToString()

Protected Functions Documentation​

function Awake​

void Awake()

function Update​

void Update()

function OnDestroy​

virtual override void OnDestroy()

Reimplements: Haply::Inverse::Unity::Singleton::OnDestroy

Public Property Documentation​

property State​

DeviceMapperState State;

Gets or sets the current state of the device mapper.

property GameObjectsInverse3​

Inverse3[] GameObjectsInverse3;

property GameObjectsVerseGrip​

VerseGrip[] GameObjectsVerseGrip;

property ClientConnection​

ClientConnection ClientConnection;

Public Attributes Documentation​

variable Ready​

UnityEvent Ready;

Unity event triggered when the device mapper is ready.

variable inverse3HandleDict​

Dictionary< Inverse3, VerseGrip > inverse3HandleDict = new();