Lemmings
Remappable Gestures For Unity
Loading...
Searching...
No Matches
Lemmings.Input.LemmingDeviceManager Class Reference

Manages runtime updates for the virtual LemmingDevice input device. It collects data from LemmingRelationships and feeds the results into InputSystem-compatible controls, enabling real-time binding of spatial relationships to Unity Input Actions. More...

Inherits MonoBehaviour.

Public Member Functions

void UpdateFromRelationships (IEnumerable< LemmingRelationship > relationships)
 Collects the output values from all active LemmingRelationships and organizes them into dictionaries grouped by data type (float, Vector3, Quaternion).

Properties

static InputDevice Instance [get]
 Provides a static reference to the registered Lemming virtual input device.

Private Member Functions

void Start ()
 Unity Start callback. Loads all eligible LemmingRelationships from Resources, filters them by useInputSystem flag, and logs the loaded controls.
void Update ()
 Unity Update loop. Each frame, we gather values from relationships and feed them into the virtual device.
void SendToInputSystem ()
 Converts the most recent float, vector, and quaternion values into InputSystem control events and queues them for processing.

Private Attributes

LemmingRelationship[] loadedRelationships
 Array of all loaded relationships configured to push values into the Input System. Populated on Start via Resources.LoadAll.
readonly Dictionary< string, float > floatValues = new()
readonly Dictionary< string, Vector3 > vector3Values = new()
readonly Dictionary< string, Quaternion > quaternionValues = new()

Static Private Attributes

static bool hasWarnedAboutMissingDevice = false
 Internal flag to prevent repeated warnings about device load failures.

Detailed Description

Manages runtime updates for the virtual LemmingDevice input device. It collects data from LemmingRelationships and feeds the results into InputSystem-compatible controls, enabling real-time binding of spatial relationships to Unity Input Actions.

Member Function Documentation

◆ UpdateFromRelationships()

void Lemmings.Input.LemmingDeviceManager.UpdateFromRelationships ( IEnumerable< LemmingRelationship > relationships)
inline

Collects the output values from all active LemmingRelationships and organizes them into dictionaries grouped by data type (float, Vector3, Quaternion).

Parameters
relationshipsThe relationships to evaluate and extract values from.

The documentation for this class was generated from the following file:
  • Assets/Lemmings/Scripts/InputSystem/LemmingDeviceManager.cs