Class AnyKeyControl
A control that simply checks the entire state it's been assigned for whether there's any non-zero bytes. If there are, the control returns 1.0; otherwise it returns 0.0.
Inherited Members
Namespace: UnityEngine.InputSystem.Controls
Assembly: Unity.InputSystem.dll
Syntax
public class AnyKeyControl : ButtonControl
Remarks
This control is used by anyKey to create a button that is toggled on as long as any of the keys on the keyboard is pressed.
Constructors
AnyKeyControl()
Default initialization. Sets state size to 1 bit and format to FormatBit.
Declaration
public AnyKeyControl()
See Also
Methods
ReadUnprocessedValueFromState(void*)
Declaration
public override float ReadUnprocessedValueFromState(void* statePtr)
Parameters
Type | Name | Description |
---|---|---|
void* | statePtr |
Returns
Type | Description |
---|---|
float |
Overrides
See Also
Extension Methods
InputControlExtensions.WriteValueIntoState<TValue, TState>(InputControl<TValue>, TValue, ref TState)