InputSystemProvider
interludesoftware.tick¶
Interlude.Tick¶
InputSystemProvider Class¶
IInput implementation that reads from the Unity Input System.
Active when ENABLE_INPUT_SYSTEM is defined.
Inheritance System.Object → InputSystemProvider
Implements IInput
Constructors¶
InputSystemProvider(bool) Constructor¶
Creates an input provider. Pass flipY true when the render target Y-axis runs top-to-bottom.
Parameters¶
flipY System.Boolean
Methods¶
InputSystemProvider.CloseOnScreenKeyboard() Method¶
Dismisses the keyboard if one is open. Safe to call repeatedly.
Implements CloseOnScreenKeyboard()
InputSystemProvider.ConsumeTextInput() Method¶
Clears the text-input buffer once a consumer has read it via PeekTextInput(), so the same characters are not delivered again next frame.
Implements ConsumeTextInput()
InputSystemProvider.GetAltHeld() Method¶
Returns true while the Alt key is held (either left or right).
Implements GetAltHeld()
Returns¶
InputSystemProvider.GetCtrlHeld() Method¶
Returns true while the Ctrl key is held (either left or right).
Implements GetCtrlHeld()
Returns¶
InputSystemProvider.GetMouseScrollDelta() Method¶
Mouse scroll delta this frame.
Implements GetMouseScrollDelta()
Returns¶
InputSystemProvider.GetOnScreenKeyboardState() Method¶
Snapshot of the open keyboard. Returns default when none is open.
Implements GetOnScreenKeyboardState()
Returns¶
InputSystemProvider.GetPointer(int) Method¶
Returns the pointer at index. Index 0 is the mouse; touches
follow at 1..N. See Pointer for the per-pointer fields and the
mouse-vs-touch coordinate convention.
Parameters¶
index System.Int32
Implements GetPointer(int)
Returns¶
InputSystemProvider.GetPointerCount() Method¶
Number of active pointers this frame: 1 on mouse-only (the mouse pointer is
always counted), plus one entry per active touch. Iterate with
GetPointer(int); mouse is always at index 0.
Implements GetPointerCount()
Returns¶
InputSystemProvider.GetShiftHeld() Method¶
Returns true while the Shift key is held (either left or right).
Implements GetShiftHeld()
Returns¶
InputSystemProvider.OpenOnScreenKeyboard(string, OnScreenKeyboardConfig) Method¶
Asks the platform to show its on-screen keyboard with initialText. No-op if a keyboard is already open. Subsequent reads come from GetOnScreenKeyboardState().
Parameters¶
initialText System.String
config OnScreenKeyboardConfig
Implements OpenOnScreenKeyboard(string, OnScreenKeyboardConfig)
InputSystemProvider.PeekTextInput() Method¶
Characters typed since the last ConsumeTextInput(), in order, as a non-allocating view over the provider's buffer. Legacy spans Input.inputString; Input-System spans a buffer accumulated via Keyboard.current.onTextInput. Bindable shortcuts do not affect this — it is uninterpreted typed text for the textbox. The span is valid only until the next input poll or ConsumeTextInput(); copy out anything that must outlive the current read.
Implements PeekTextInput()
Returns¶
System.ReadOnlySpan<System.Char>
InputSystemProvider.Update() Method¶
Called once per frame to let the provider update its internal state.
Implements Update()