Input System  v0.1
ISX.InputDevice Class Reference

The root of a control hierarchy. More...

Inheritance diagram for ISX.InputDevice:
ISX.InputControl ISX.Gamepad ISX.HID.HID ISX.Keyboard ISX.Pointer ISX.XInput.XInputController ISX.Mouse ISX.Pen ISX.Touchscreen

Public Member Functions

virtual void MakeCurrent ()
 Make this the current device of its type. More...
 
virtual void OnConfigurationChanged ()
 Called by the system when the configuration of the device has changed. More...
 

Properties

bool remote [get]
 Whether the device is mirrored from a remote input system and not actually present as a "real" device in the local system. More...
 
bool native [get]
 Whether the device comes from the native Unity runtime. More...
 
double lastUpdateTime [get]
 Timestamp of last state event used to update the device. More...
 

Detailed Description

The root of a control hierarchy.

Input devices act as the container for control hierarchies. Every hierarchy has to have a device at the root. Devices cannot occur inside of hierarchies.

Unlike other controls, usages of InputDevices are allowed to be changed on the fly without requiring a change to the device template (InputSystem.SetUsage).

Todo:
The entire control hierarchy should be a linear array; transition to that with InputData.

Member Function Documentation

◆ MakeCurrent()

virtual void ISX.InputDevice.MakeCurrent ( )
virtual

Make this the current device of its type.

Use this to set static properties that give fast access to the latest device used of a given type (Gamepad.current or XRController.leftHand and XRController.rightHand).

This functionality is somewhat like a 'pwd' for the semantic paths but one where there can be multiple current working directories, one for each type.

A device will be made current by the system initially when it is created and subsequently whenever it receives an event.

◆ OnConfigurationChanged()

virtual void ISX.InputDevice.OnConfigurationChanged ( )
virtual

Called by the system when the configuration of the device has changed.

See also
LowLevel.ConfigChangeEvent

Property Documentation

◆ lastUpdateTime

double ISX.InputDevice.lastUpdateTime
get

Timestamp of last state event used to update the device.

Events other than LowLevel.StateEvent and LowLevel.DeltaStateEvent will not cause lastUpdateTime to be changed.

◆ native

bool ISX.InputDevice.native
get

Whether the device comes from the native Unity runtime.

◆ remote

bool ISX.InputDevice.remote
get

Whether the device is mirrored from a remote input system and not actually present as a "real" device in the local system.