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 | |
|---|---|
| StateDelegate | StateChanged() Event triggered when the state changes. |
| Action< DeviceMapperState, DeviceMapperState > | StateChangedAsync() Unity event triggered after state changes have been processed. |
Public Functions
| Name | |
|---|---|
| delegate void | StateDelegate(DeviceMapperState state, DeviceMapperState previous) Delegate for handling state changes. |
| bool | IsReady() Checks if the device mapper is in the 'Ready' state. |
| Inverse3 | GetInverse3(uint id) Retrieves the already mapped Inverse3 instance with the specified device ID. |
| VerseGrip | GetVerseGrip(uint id) Retrieves the already mapped VerseGrip instance with the specified device ID. |
| GameObject | GetDeviceGameObject(uint id) Retrieves the GameObject associated with an already mapped device (either Inverse3 or VerseGrip) using the specified device ID. |
| override string | ToString() |
Protected Functions
| Name | |
|---|---|
| void | Awake() |
| void | Update() |
| virtual override void | OnDestroy() |
Public Properties
| Name | |
|---|---|
| DeviceMapperState | State Gets or sets the current state of the device mapper. |
| Inverse3[] | GameObjectsInverse3 |
| VerseGrip[] | GameObjectsVerseGrip |
| ClientConnection | ClientConnection |
Public Attributes
| Name | |
|---|---|
| UnityEvent | Ready 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 | |
|---|---|
| void | InitializeInstance() Initializes the singleton instance. |
| bool | Exists() |
Protected Functions inherited from Haply.Inverse.Unity.Singleton< DeviceMapper >
| Name | |
|---|---|
| virtual void | OnApplicationQuit() |
Public Properties inherited from Haply.Inverse.Unity.Singleton< DeviceMapper >
| Name | |
|---|---|
| T | Instance 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();