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.
|
| 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).
|
|
|
static InputDevice | Instance [get] |
| | Provides a static reference to the registered Lemming virtual input device.
|
|
|
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.
|
|
|
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 bool | hasWarnedAboutMissingDevice = false |
| | Internal flag to prevent repeated warnings about device load failures.
|
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.
◆ 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
-
| relationships | The relationships to evaluate and extract values from. |
The documentation for this class was generated from the following file:
- Assets/Lemmings/Scripts/InputSystem/LemmingDeviceManager.cs