Struct InputDeviceCommand
Data header for a command send to an InputDevice.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: UnityEngine.Experimental.Input.LowLevel
Syntax
public struct InputDeviceCommand : IInputDeviceCommandInfo
Remarks
Commands are essentially synchronously processed events send directly to a specific device. Their primary use is to expose device-specific functions without having to extend the C# API used to communicate between input code and backend device implementations (which may sit in native code).
Like input events, device commands use
Constructors
InputDeviceCommand(FourCC, Int32)
Declaration
public InputDeviceCommand(FourCC type, int sizeInBytes = 8)
Parameters
Type | Name | Description |
---|---|---|
FourCC | type | |
System.Int32 | sizeInBytes |
Fields
kBaseCommandSize
Declaration
public const int kBaseCommandSize = 8
Field Value
Type | Description |
---|---|
System.Int32 |
kGenericFailure
Generic failure code for
Declaration
public const long kGenericFailure = -1L
Field Value
Type | Description |
---|---|
System.Int64 |
Remarks
Any negative return value for an
kGenericSuccess
Declaration
public const long kGenericSuccess = 1L
Field Value
Type | Description |
---|---|
System.Int64 |
sizeInBytes
Declaration
public int sizeInBytes
Field Value
Type | Description |
---|---|
System.Int32 |
type
Declaration
public FourCC type
Field Value
Type | Description |
---|---|
FourCC |
Properties
payloadPtr
Declaration
public void *payloadPtr { get; }
Property Value
Type | Description |
---|---|
System.Void* |
payloadSizeInBytes
Declaration
public int payloadSizeInBytes { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
AllocateNative(FourCC, Int32)
Declaration
public static NativeArray<byte> AllocateNative(FourCC type, int payloadSize)
Parameters
Type | Name | Description |
---|---|---|
FourCC | type | |
System.Int32 | payloadSize |
Returns
Type | Description |
---|---|
NativeArray<System.Byte> |
GetTypeStatic()
Declaration
public FourCC GetTypeStatic()
Returns
Type | Description |
---|---|
FourCC |