Struct MyDeviceState
Example state struct describing the memory layout of MyDevice.
Implements
Namespace: DocCodeSamples.Tests
Assembly: Unity.InputSystem.DocCodeSamples.dll
Syntax
public struct MyDeviceState : IInputStateTypeInfo
Fields
axis
Raw state for the device's analog axis control.
Declaration
[InputControl(layout = "Analog", parameters = "clamp=true,clampMin=0,clampMax=1")]
public float axis
Field Value
| Type | Description |
|---|---|
| float |
buttons
Bit-packed state for firstButton and secondButton.
Declaration
[InputControl(name = "firstButton", layout = "Button", bit = 0)]
[InputControl(name = "secondButton", layout = "Button", bit = 1)]
public int buttons
Field Value
| Type | Description |
|---|---|
| int |
Properties
format
The memory format identifier for this state struct.
Declaration
public FourCC format { get; }
Property Value
| Type | Description |
|---|---|
| FourCC |