From ddc5d5039299a0501adcc39bc8fa733d75e50f80 Mon Sep 17 00:00:00 2001 From: JosepMariaPujol Date: Tue, 21 Apr 2026 17:58:15 +0200 Subject: [PATCH] Removing pvp 151-1 exceptions --- .yamato/wrench/pvp-exemptions.json | 1037 ----------------- .../Composites/ButtonWithOneModifier.cs | 1 + .../Composites/ButtonWithTwoModifiers.cs | 1 + .../Composites/OneModifierComposite.cs | 2 + .../Composites/TwoModifiersComposite.cs | 2 + .../Actions/InputActionParameters.cs | 8 + .../Actions/InputActionRebindingExtensions.cs | 10 + .../Actions/InputActionReference.cs | 4 +- .../Actions/InputActionSetupExtensions.cs | 5 + .../InputSystem/Actions/InputBinding.cs | 5 + .../Actions/InputBindingComposite.cs | 1 + .../Actions/InputBindingCompositeContext.cs | 3 + .../InputSystem/Actions/InputControlScheme.cs | 16 + .../Actions/Interactions/PressInteraction.cs | 2 + .../Interactions/SlowTapInteraction.cs | 2 + .../Actions/Interactions/TapInteraction.cs | 2 + .../InputSystem/Controls/AxisControl.cs | 2 + .../InputSystem/Controls/ButtonControl.cs | 1 + .../InputSystem/Controls/DeltaControl.cs | 1 + .../Controls/DiscreteButtonControl.cs | 3 + .../InputSystem/Controls/DpadControl.cs | 8 + .../InputSystem/Controls/InputControl.cs | 48 +- .../Controls/InputControlAttribute.cs | 4 + .../Controls/InputControlExtensions.cs | 72 +- .../Controls/InputControlLayout.cs | 71 ++ .../Controls/InputControlLayoutAttribute.cs | 4 + .../Controls/InputControlLayoutChange.cs | 3 + .../InputSystem/Controls/InputControlList.cs | 12 + .../InputSystem/Controls/InputControlPath.cs | 13 + .../InputSystem/Controls/InputProcessor.cs | 2 + .../InputSystem/Controls/IntegerControl.cs | 1 + .../InputSystem/Controls/KeyControl.cs | 1 + .../Processors/StickDeadzoneProcessor.cs | 3 + .../InputSystem/Controls/QuaternionControl.cs | 1 + .../InputSystem/Controls/StickControl.cs | 1 + .../InputSystem/Controls/TouchPressControl.cs | 1 + .../InputSystem/Controls/Vector2Control.cs | 1 + .../InputSystem/Controls/Vector3Control.cs | 9 + .../Devices/Commands/DisableDeviceCommand.cs | 4 + .../Devices/Commands/EnableDeviceCommand.cs | 4 + .../Commands/EnableIMECompositionCommand.cs | 4 + .../InitiateUserAccountPairingCommand.cs | 5 + .../Devices/Commands/InputDeviceCommand.cs | 13 + .../Commands/QueryCanRunInBackground.cs | 5 + .../Commands/QueryDimensionsCommand.cs | 5 + .../Commands/QueryEnabledStateCommand.cs | 5 + .../Devices/Commands/QueryKeyNameCommand.cs | 7 + .../Commands/QueryKeyboardLayoutCommand.cs | 5 + .../Commands/QueryPairedUserAccountCommand.cs | 5 + .../Devices/Commands/RequestResetCommand.cs | 4 + .../Devices/Commands/RequestSyncCommand.cs | 4 + .../Commands/SetIMECursorPositionCommand.cs | 5 + .../Commands/SetSamplingFrequencyCommand.cs | 5 + .../InputSystem/Devices/Gamepad.cs | 1 + .../Devices/IInputUpdateCallbackReceiver.cs | 1 + .../InputSystem/Devices/InputDevice.cs | 3 + .../InputSystem/Devices/Keyboard.cs | 5 + .../Devices/Remote/InputRemoting.cs | 16 + .../InputSystem/Devices/Sensor.cs | 5 + .../InputSystem/Devices/Touchscreen.cs | 8 + .../InputSystem/Devices/TrackedDevice.cs | 1 + .../InputSystem/Events/DeltaStateEvent.cs | 10 + .../Events/DeviceConfigurationEvent.cs | 5 + .../InputSystem/Events/DeviceRemoveEvent.cs | 4 + .../InputSystem/Events/DeviceResetEvent.cs | 3 + .../InputSystem/Events/IInputEventTypeInfo.cs | 1 + .../InputSystem/Events/IMECompositionEvent.cs | 10 + .../InputSystem/Events/InputEvent.cs | 4 + .../InputSystem/Events/InputEventBuffer.cs | 5 + .../InputSystem/Events/InputEventTrace.cs | 4 + .../InputSystem/Events/StateEvent.cs | 7 + .../InputSystem/Events/TextEvent.cs | 6 + .../Plugins/EnhancedTouch/Touch.cs | 6 +- .../Plugins/EnhancedTouch/TouchSimulation.cs | 12 + .../InputSystem/Plugins/HID/HID.cs | 678 +++++++++++ .../InputSystem/Plugins/HID/HIDSupport.cs | 3 + .../Plugins/OnScreen/OnScreenControl.cs | 4 + .../PlayerInput/DefaultInputActions.cs | 64 + .../Plugins/PlayerInput/PlayerInputManager.cs | 9 + .../InputSystem/Plugins/Users/InputUser.cs | 15 + .../Plugins/Users/InputUserAccountHandle.cs | 8 + .../Plugins/Users/InputUserChange.cs | 5 + .../Plugins/XInput/IXboxOneRumble.cs | 1 + .../Plugins/XInput/XInputController.cs | 49 +- .../InputSystem/State/IInputStateTypeInfo.cs | 1 + .../InputSystem/State/InputState.cs | 16 + .../InputSystem/State/InputStateBlock.cs | 23 + .../InputSystem/Utilities/Comparers.cs | 2 + .../Utilities/DisplayStringFormatAttribute.cs | 1 + .../InputSystem/Utilities/FourCC.cs | 2 + .../InputSystem/Utilities/InternedString.cs | 10 + .../Utilities/NameAndParameters.cs | 5 + .../InputSystem/Utilities/NamedValue.cs | 14 + .../InputSystem/Utilities/PrimitiveValue.cs | 1 + .../InputSystem/Utilities/ReadOnlyArray.cs | 6 +- .../IntegrationTests/IntegrationTests.cs | 5 + .../Tests/TestFixture/InputTestFixture.cs | 38 + 97 files changed, 1412 insertions(+), 1108 deletions(-) diff --git a/.yamato/wrench/pvp-exemptions.json b/.yamato/wrench/pvp-exemptions.json index 5ebceca6dd..bec0302386 100644 --- a/.yamato/wrench/pvp-exemptions.json +++ b/.yamato/wrench/pvp-exemptions.json @@ -546,1043 +546,6 @@ "UnityEngine.InputSystem.Composites.Vector3Composite: in block context (only allowed in top-level context)", "UnityEngine.InputSystem.XInput.XInputController: in block context (only allowed in top-level context)" ] - }, - "PVP-151-1": { - "errors": [ - "UnityEngine.InputSystem.Controls.AxisControl: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Controls.AxisControl: FourCC CalculateOptimizedControlDataType(): undocumented", - "UnityEngine.InputSystem.Controls.ButtonControl: wasReleasedThisFrame: undocumented", - "UnityEngine.InputSystem.Composites.ButtonWithOneModifier: void FinishSetup(ref InputBindingCompositeContext): undocumented", - "UnityEngine.InputSystem.Composites.ButtonWithTwoModifiers: void FinishSetup(ref InputBindingCompositeContext): undocumented", - "UnityEngine.InputSystem.Utilities.Vector2MagnitudeComparer: int Compare(Vector2, Vector2): undocumented", - "UnityEngine.InputSystem.Utilities.Vector3MagnitudeComparer: int Compare(Vector3, Vector3): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: asset: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: .ctor(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: void Dispose(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: bindingMask: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: devices: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: controlSchemes: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: bool Contains(InputAction): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: IEnumerator GetEnumerator(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: void Enable(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: void Disable(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: bindings: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: InputAction FindAction(string, bool): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: int FindBinding(InputBinding, out InputAction): undocumented", - "UnityEngine.InputSystem.DefaultInputActions: Player: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: UI: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: KeyboardMouseScheme: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: GamepadScheme: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: TouchScheme: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: JoystickScheme: undocumented", - "UnityEngine.InputSystem.DefaultInputActions: XRScheme: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: .ctor(DefaultInputActions): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: Move: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: Look: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: Fire: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: InputActionMap Get(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: void Enable(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: void Disable(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: enabled: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: InputActionMap op_Implicit(PlayerActions): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.PlayerActions: void SetCallbacks(IPlayerActions): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: .ctor(DefaultInputActions): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: Navigate: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: Submit: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: Cancel: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: Point: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: Click: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: ScrollWheel: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: MiddleClick: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: RightClick: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: TrackedDevicePosition: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: TrackedDeviceOrientation: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: InputActionMap Get(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: void Enable(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: void Disable(): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: enabled: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: InputActionMap op_Implicit(UIActions): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.UIActions: void SetCallbacks(IUIActions): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IPlayerActions: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IPlayerActions: void OnMove(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IPlayerActions: void OnLook(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IPlayerActions: void OnFire(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnNavigate(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnSubmit(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnCancel(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnPoint(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnClick(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnScrollWheel(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnMiddleClick(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnRightClick(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnTrackedDevicePosition(CallbackContext): undocumented", - "UnityEngine.InputSystem.DefaultInputActions.IUIActions: void OnTrackedDeviceOrientation(CallbackContext): undocumented", - "UnityEngine.InputSystem.Controls.DeltaControl: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: baseEvent: undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: stateFormat: undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: stateOffset: undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: deltaStateSizeInBytes: undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: deltaState: undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: InputEventPtr ToEventPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: DeltaStateEvent* From(InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.DeltaStateEvent: NativeArray From(InputControl, out InputEventPtr, Allocator): undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceConfigurationEvent: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceConfigurationEvent: baseEvent: undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceConfigurationEvent: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceConfigurationEvent: InputEventPtr ToEventPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceConfigurationEvent: DeviceConfigurationEvent Create(int, double): undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceRemoveEvent: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceRemoveEvent: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceRemoveEvent: InputEventPtr ToEventPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceRemoveEvent: DeviceRemoveEvent Create(int, double): undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceResetEvent: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceResetEvent: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.DeviceResetEvent: DeviceResetEvent Create(int, bool, double): undocumented", - "UnityEngine.InputSystem.LowLevel.DisableDeviceCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.DisableDeviceCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.DisableDeviceCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.DisableDeviceCommand: DisableDeviceCommand Create(): undocumented", - "UnityEngine.InputSystem.Controls.DiscreteButtonControl: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Controls.DiscreteButtonControl: float ReadUnprocessedValueFromState(void*): undocumented", - "UnityEngine.InputSystem.Controls.DiscreteButtonControl: void WriteValueIntoState(float, void*): undocumented", - "UnityEngine.InputSystem.Utilities.DisplayStringFormatAttribute: .ctor(string): undocumented", - "UnityEngine.InputSystem.Controls.DpadControl: up: undocumented", - "UnityEngine.InputSystem.Controls.DpadControl: .ctor(): undocumented", - "UnityEngine.InputSystem.Controls.DpadControl: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Controls.DpadControl: Vector2 ReadUnprocessedValueFromState(void*): undocumented", - "UnityEngine.InputSystem.Controls.DpadControl: void WriteValueIntoState(Vector2, void*): undocumented", - "UnityEngine.InputSystem.Controls.DpadControl.DpadAxisControl: undocumented", - "UnityEngine.InputSystem.Controls.DpadControl.DpadAxisControl: component: undocumented", - "UnityEngine.InputSystem.Controls.DpadControl.DpadAxisControl: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Controls.DpadControl.DpadAxisControl: float ReadUnprocessedValueFromState(void*): undocumented", - "UnityEngine.InputSystem.LowLevel.EnableDeviceCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.EnableDeviceCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.EnableDeviceCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.EnableDeviceCommand: EnableDeviceCommand Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.EnableIMECompositionCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.EnableIMECompositionCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.EnableIMECompositionCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.EnableIMECompositionCommand: EnableIMECompositionCommand Create(bool): undocumented", - "UnityEngine.InputSystem.Utilities.FourCC: FourCC FromInt32(int): undocumented", - "UnityEngine.InputSystem.Utilities.FourCC: int ToInt32(FourCC): undocumented", - "UnityEngine.InputSystem.LowLevel.GamepadState: Format: undocumented", - "UnityEngine.InputSystem.HID.HID: QueryHIDParsedReportDescriptorDeviceCommandType: undocumented", - "UnityEngine.InputSystem.HID.HID: string UsagePageToString(UsagePage): undocumented", - "UnityEngine.InputSystem.HID.HID: string UsageToString(UsagePage, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDReportType: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDReportType: Unknown: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDReportType: Input: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDReportType: Output: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDReportType: Feature: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: Physical: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: Application: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: Logical: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: Report: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: NamedArray: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: UsageSwitch: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionType: UsageModifier: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: Constant: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: Variable: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: Relative: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: Wrap: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: NonLinear: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: NoPreferred: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: NullState: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: Volatile: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementFlags: BufferedBytes: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: usage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: usagePage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: unit: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: unitExponent: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: logicalMin: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: logicalMax: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: physicalMin: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: physicalMax: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: reportType: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: collectionIndex: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: reportId: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: reportSizeInBits: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: reportOffsetInBits: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: flags: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: usageMin: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: usageMax: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: hasNullState: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: hasPreferredState: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: isArray: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: isNonLinear: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: isRelative: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: isConstant: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: isWrapping: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDElementDescriptor: bool Is(UsagePage, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionDescriptor: type: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionDescriptor: usage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionDescriptor: usagePage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionDescriptor: parent: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionDescriptor: childCount: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDCollectionDescriptor: firstChild: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptor: usage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptor: usagePage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptor: elements: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptor: collections: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptor: string ToJson(): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptor: HIDDeviceDescriptor FromJson(string): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: usagePage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: usage: undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: .ctor(UsagePage, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: .ctor(GenericDesktop): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: HIDDeviceDescriptorBuilder StartReport(HIDReportType, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: HIDDeviceDescriptorBuilder AddElement(UsagePage, int, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: HIDDeviceDescriptorBuilder AddElement(GenericDesktop, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: HIDDeviceDescriptorBuilder WithPhysicalMinMax(int, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: HIDDeviceDescriptorBuilder WithLogicalMinMax(int, int): undocumented", - "UnityEngine.InputSystem.HID.HID.HIDDeviceDescriptorBuilder: HIDDeviceDescriptor Finish(): undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Undefined: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: GenericDesktop: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Simulation: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: VRControls: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: SportControls: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: GameControls: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: GenericDeviceControls: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Keyboard: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: LEDs: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Button: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Ordinal: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Telephony: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Consumer: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Digitizer: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: PID: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Unicode: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: AlphanumericDisplay: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: MedicalInstruments: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Monitor: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Power: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: BarCodeScanner: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: MagneticStripeReader: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Camera: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: Arcade: undocumented", - "UnityEngine.InputSystem.HID.HID.UsagePage: VendorDefined: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Undefined: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Pointer: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Mouse: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Joystick: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Gamepad: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Keyboard: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Keypad: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: MultiAxisController: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: TabletPCControls: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: AssistiveControl: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: X: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Y: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Z: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Rx: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Ry: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Rz: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Slider: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Dial: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Wheel: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: HatSwitch: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: CountedBuffer: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: ByteCount: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: MotionWakeup: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Start: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Select: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Vx: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Vy: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Vz: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Vbrx: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Vbry: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Vbrz: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: Vno: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: FeatureNotification: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: ResolutionMultiplier: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemControl: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemPowerDown: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemSleep: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemWakeUp: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemContextMenu: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMainMenu: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemAppMenu: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMenuHelp: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMenuExit: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMenuSelect: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMenuRight: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMenuLeft: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMenuUp: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemMenuDown: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemColdRestart: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemWarmRestart: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: DpadUp: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: DpadDown: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: DpadRight: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: DpadLeft: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDock: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemUndock: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemSetup: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemBreak: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDebuggerBreak: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: ApplicationBreak: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: ApplicationDebuggerBreak: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemSpeakerMute: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemHibernate: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplayInvert: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplayInternal: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplayExternal: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplayBoth: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplayDual: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplayToggleIntExt: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplaySwapPrimarySecondary: undocumented", - "UnityEngine.InputSystem.HID.HID.GenericDesktop: SystemDisplayLCDAutoScale: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Undefined: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: FlightSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: AutomobileSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: TankSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: SpaceshipSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: SubmarineSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: SailingSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: MotorcycleSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: SportsSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: AirplaneSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: HelicopterSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: MagicCarpetSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: BicylcleSimulationDevice: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: FlightControlStick: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: FlightStick: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: CyclicControl: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: CyclicTrim: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: FlightYoke: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: TrackControl: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Aileron: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: AileronTrim: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: AntiTorqueControl: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: AutopilotEnable: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: ChaffRelease: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: CollectiveControl: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: DiveBreak: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: ElectronicCountermeasures: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Elevator: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: ElevatorTrim: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Rudder: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Throttle: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: FlightCommunications: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: FlareRelease: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: LandingGear: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: ToeBreak: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Trigger: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: WeaponsArm: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: WeaponsSelect: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: WingFlaps: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Accelerator: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Brake: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Clutch: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Shifter: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Steering: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: TurretDirection: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: BarrelElevation: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: DivePlane: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: Ballast: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: BicycleCrank: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: HandleBars: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: FrontBrake: undocumented", - "UnityEngine.InputSystem.HID.HID.Simulation: RearBrake: undocumented", - "UnityEngine.InputSystem.HID.HID.Button: undocumented", - "UnityEngine.InputSystem.HID.HID.Button: Undefined: undocumented", - "UnityEngine.InputSystem.HID.HID.Button: Primary: undocumented", - "UnityEngine.InputSystem.HID.HID.Button: Secondary: undocumented", - "UnityEngine.InputSystem.HID.HID.Button: Tertiary: undocumented", - "UnityEngine.InputSystem.HID.HIDSupport.HIDPageUsage: .ctor(UsagePage, int): missing ", - "UnityEngine.InputSystem.HID.HIDSupport.HIDPageUsage: .ctor(UsagePage, int): missing ", - "UnityEngine.InputSystem.HID.HIDSupport.HIDPageUsage: .ctor(GenericDesktop): missing ", - "UnityEngine.InputSystem.LowLevel.IInputEventTypeInfo: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.IInputStateTypeInfo: format: undocumented", - "UnityEngine.InputSystem.LowLevel.IInputUpdateCallbackReceiver: void OnUpdate(): undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionEvent: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionEvent: baseEvent: undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionEvent: compositionString: undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionEvent: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionEvent: IMECompositionEvent Create(int, string, double): undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionString: Count: undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionString: this[int]: undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionString: .ctor(string): undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionString: string ToString(): undocumented", - "UnityEngine.InputSystem.LowLevel.IMECompositionString: IEnumerator GetEnumerator(): undocumented", - "UnityEngine.InputSystem.LowLevel.InitiateUserAccountPairingCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.InitiateUserAccountPairingCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.InitiateUserAccountPairingCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.InitiateUserAccountPairingCommand: InitiateUserAccountPairingCommand Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.InitiateUserAccountPairingCommand.Result: undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions: TValue? GetParameterValue(InputAction, Expression>, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: TValue? GetParameterValue(InputAction, Expression>, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void ApplyParameterOverride(InputAction, Expression>, TValue, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void ApplyParameterOverride(InputAction, Expression>, TValue, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void ApplyParameterOverride(InputActionMap, Expression>, TValue, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void ApplyParameterOverride(InputActionMap, Expression>, TValue, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void ApplyParameterOverride(InputActionAsset, Expression>, TValue, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void ApplyParameterOverride(InputActionAsset, Expression>, TValue, InputBinding): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void ApplyBindingOverrides(InputActionMap, IEnumerable): undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions: void RemoveBindingOverrides(InputActionMap, IEnumerable): undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: kDefaultMagnitudeThreshold: undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: startTime: undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: timeout: undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: RebindingOperation WithMatchingEventsBeingSuppressed(bool): missing ", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: RebindingOperation WithCancelingThrough(InputControl): undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: RebindingOperation WithExpectedControlType(string): undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: RebindingOperation WithExpectedControlType(Type): undocumented", - "UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation: RebindingOperation WithExpectedControlType(): undocumented", - "UnityEngine.InputSystem.InputActionReference: InputAction ToInputAction(): undocumented", - "UnityEngine.InputSystem.InputActionSetupExtensions: InputControlScheme WithDevice(InputControlScheme, string, bool): undocumented", - "UnityEngine.InputSystem.InputActionSetupExtensions: InputControlScheme WithRequiredDevice(InputControlScheme, string): undocumented", - "UnityEngine.InputSystem.InputActionSetupExtensions: InputControlScheme WithOptionalDevice(InputControlScheme, string): undocumented", - "UnityEngine.InputSystem.InputActionSetupExtensions: InputControlScheme OrWithRequiredDevice(InputControlScheme, string): undocumented", - "UnityEngine.InputSystem.InputActionSetupExtensions: InputControlScheme OrWithOptionalDevice(InputControlScheme, string): undocumented", - "UnityEngine.InputSystem.InputBinding: string GetNameOfComposite(): undocumented", - "UnityEngine.InputSystem.InputBinding: InputBinding MaskByGroup(string): undocumented", - "UnityEngine.InputSystem.InputBinding: InputBinding MaskByGroups(params string[]): undocumented", - "UnityEngine.InputSystem.InputBinding: string ToDisplayString(out string, out string, DisplayStringOptions, InputControl): missing ", - "UnityEngine.InputSystem.InputBinding: string ToDisplayString(out string, out string, DisplayStringOptions, InputControl): missing ", - "UnityEngine.InputSystem.InputBindingComposite: void FinishSetup(ref InputBindingCompositeContext): missing ", - "UnityEngine.InputSystem.InputBindingCompositeContext: float EvaluateMagnitude(int): undocumented", - "UnityEngine.InputSystem.InputBindingCompositeContext: void ReadValue(int, void*, int): undocumented", - "UnityEngine.InputSystem.InputBindingCompositeContext: object ReadValueAsObject(int): undocumented", - "UnityEngine.InputSystem.InputControl: aliases: undocumented", - "UnityEngine.InputSystem.InputControl: stateBlock: undocumented", - "UnityEngine.InputSystem.InputControl: this[string]: missing ", - "UnityEngine.InputSystem.InputControl: object ReadValueFromBufferAsObject(void*, int): undocumented", - "UnityEngine.InputSystem.InputControl: TControl TryGetChildControl(string): undocumented", - "UnityEngine.InputSystem.InputControl: InputControl GetChildControl(string): undocumented", - "UnityEngine.InputSystem.InputControl: TControl GetChildControl(string): undocumented", - "UnityEngine.InputSystem.InputControl: .ctor(): undocumented", - "UnityEngine.InputSystem.InputControl: void RefreshConfiguration(): undocumented", - "UnityEngine.InputSystem.InputControl: m_StateBlock: undocumented", - "UnityEngine.InputSystem.InputControl: currentStatePtr: undocumented", - "UnityEngine.InputSystem.InputControl: previousFrameStatePtr: undocumented", - "UnityEngine.InputSystem.InputControl: defaultStatePtr: undocumented", - "UnityEngine.InputSystem.InputControl: FourCC CalculateOptimizedControlDataType(): missing ", - "UnityEngine.InputSystem.InputControl: valueType: undocumented", - "UnityEngine.InputSystem.InputControl: valueSizeInBytes: undocumented", - "UnityEngine.InputSystem.InputControl: TValue ReadValueFromState(void*): undocumented", - "UnityEngine.InputSystem.InputControl: TValue ReadUnprocessedValue(): undocumented", - "UnityEngine.InputSystem.InputControl: TValue ReadUnprocessedValueFromState(void*): undocumented", - "UnityEngine.InputSystem.InputControl: void WriteValueFromBufferIntoState(void*, int, void*): undocumented", - "UnityEngine.InputSystem.InputControl: void WriteValueIntoState(TValue, void*): undocumented", - "UnityEngine.InputSystem.InputControl: bool CompareValue(void*, void*): undocumented", - "UnityEngine.InputSystem.InputControl: TValue ProcessValue(TValue): undocumented", - "UnityEngine.InputSystem.InputControl: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlAttribute: useStateFrom: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlAttribute: bit: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlAttribute: arraySize: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlAttribute: maxValue: undocumented", - "UnityEngine.InputSystem.InputControlExtensions: TControl FindInParentChain(InputControl): missing ", - "UnityEngine.InputSystem.InputControlExtensions: object ReadValueAsObject(InputControl): missing ", - "UnityEngine.InputSystem.InputControlExtensions: void ReadValueIntoBuffer(InputControl, void*, int): missing ", - "UnityEngine.InputSystem.InputControlExtensions: TValue ReadUnprocessedValueFromEvent(InputControl, InputEventPtr): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: bool ReadUnprocessedValueFromEvent(InputControl, InputEventPtr, out TValue): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueFromObjectIntoEvent(InputControl, InputEventPtr, object): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueIntoState(InputControl, TValue, void*): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueIntoState(InputControl, TValue, void*): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueIntoState(InputControl, void*): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueIntoState(InputControl, TValue, ref TState): missing ", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueIntoState(InputControl, TValue, ref TState): missing ", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueIntoEvent(InputControl, TValue, InputEventPtr): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: void WriteValueIntoEvent(InputControl, TValue, InputEventPtr): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: bool CheckStateIsAtDefaultIgnoringNoise(InputControl): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: bool CompareStateIgnoringNoise(InputControl, void*): missing ", - "UnityEngine.InputSystem.InputControlExtensions: bool CompareState(InputControl, void*, void*, void*): missing ", - "UnityEngine.InputSystem.InputControlExtensions: bool CompareState(InputControl, void*, void*): undocumented", - "UnityEngine.InputSystem.InputControlExtensions: void FindControlsRecursive(InputControl, IList, Func): undocumented", - "UnityEngine.InputSystem.InputControlExtensions.InputEventControlEnumerator: bool MoveNext(): undocumented", - "UnityEngine.InputSystem.InputControlExtensions.InputEventControlEnumerator: void Reset(): undocumented", - "UnityEngine.InputSystem.InputControlExtensions.InputEventControlEnumerator: void Dispose(): undocumented", - "UnityEngine.InputSystem.InputControlExtensions.InputEventControlEnumerator: Current: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: DefaultVariant: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: VariantSeparator: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: name: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: displayName: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: type: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: variants: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: stateFormat: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: stateSizeInBytes: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: baseLayouts: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: appliedOverrides: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: commonUsages: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: updateBeforeRender: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: isDeviceLayout: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: isControlLayout: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: isGenericTypeOfDevice: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: hideInUI: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: this[string]: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: ControlItem? FindControl(InternedString): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: ControlItem? FindControlIncludingArrayElements(string, out int): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: InputControlLayout FromType(string, Type): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: string ToJson(): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout: InputControlLayout FromJson(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: variants: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: useStateFrom: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: usages: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: aliases: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: parameters: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: processors: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: offset: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: bit: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: sizeInBits: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: format: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: arraySize: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: minValue: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: maxValue: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: isArray: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.ControlItem: ControlItem Merge(ControlItem): missing ", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: Builder WithName(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: Builder WithDisplayName(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: Builder WithType(): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: Builder WithFormat(FourCC): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: Builder WithFormat(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: Builder WithSizeInBytes(int): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: Builder Extend(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder: InputControlLayout Build(): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithDisplayName(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithLayout(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithFormat(FourCC): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithFormat(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithByteOffset(uint): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithBitOffset(uint): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder IsSynthetic(bool): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder IsNoisy(bool): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder DontReset(bool): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithSizeInBits(uint): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithRange(float, float): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithUsages(params InternedString[]): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithUsages(IEnumerable): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithUsages(params string[]): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithParameters(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithProcessors(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder WithDefaultState(PrimitiveValue): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder UsingStateFrom(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.Builder.ControlBuilder: ControlBuilder AsArrayOfControlsWithSize(int): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.LayoutNotFoundException: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.LayoutNotFoundException: layout: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.LayoutNotFoundException: .ctor(): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.LayoutNotFoundException: .ctor(string, string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.LayoutNotFoundException: .ctor(string): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.LayoutNotFoundException: .ctor(string, Exception): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayout.LayoutNotFoundException: .ctor(SerializationInfo, StreamingContext): undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayoutAttribute: commonUsages: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayoutAttribute: variants: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayoutAttribute: canRunInBackground: undocumented", - "UnityEngine.InputSystem.Layouts.InputControlLayoutAttribute: description: undocumented", - "UnityEngine.InputSystem.InputControlLayoutChange: Added: undocumented", - "UnityEngine.InputSystem.InputControlLayoutChange: Removed: undocumented", - "UnityEngine.InputSystem.InputControlLayoutChange: Replaced: undocumented", - "UnityEngine.InputSystem.InputControlList: void CopyTo(TControl[], int): undocumented", - "UnityEngine.InputSystem.InputControlList: int IndexOf(TControl): undocumented", - "UnityEngine.InputSystem.InputControlList: int IndexOf(TControl, int, int): undocumented", - "UnityEngine.InputSystem.InputControlList: void Insert(int, TControl): undocumented", - "UnityEngine.InputSystem.InputControlList: void Clear(): undocumented", - "UnityEngine.InputSystem.InputControlList: bool Contains(TControl): undocumented", - "UnityEngine.InputSystem.InputControlList: bool Contains(TControl, int, int): undocumented", - "UnityEngine.InputSystem.InputControlList: void SwapElements(int, int): undocumented", - "UnityEngine.InputSystem.InputControlList: void Sort(int, int, TCompare): undocumented", - "UnityEngine.InputSystem.InputControlList: void Dispose(): undocumented", - "UnityEngine.InputSystem.InputControlList: IEnumerator GetEnumerator(): undocumented", - "UnityEngine.InputSystem.InputControlList: string ToString(): undocumented", - "UnityEngine.InputSystem.InputControlPath: Wildcard: undocumented", - "UnityEngine.InputSystem.InputControlPath: DoubleWildcard: undocumented", - "UnityEngine.InputSystem.InputControlPath: Separator: undocumented", - "UnityEngine.InputSystem.InputControlPath: string Combine(InputControl, string): undocumented", - "UnityEngine.InputSystem.InputControlPath: string[] TryGetDeviceUsages(string): undocumented", - "UnityEngine.InputSystem.InputControlPath: string TryGetControlLayout(string): undocumented", - "UnityEngine.InputSystem.InputControlPath: InputControl TryFindControl(InputControl, string, int): undocumented", - "UnityEngine.InputSystem.InputControlPath: InputControl[] TryFindControls(InputControl, string, int): undocumented", - "UnityEngine.InputSystem.InputControlPath: int TryFindControls(InputControl, string, ref InputControlList, int): undocumented", - "UnityEngine.InputSystem.InputControlPath: TControl TryFindControl(InputControl, string, int): missing ", - "UnityEngine.InputSystem.InputControlPath: InputControl TryFindChild(InputControl, string, int): undocumented", - "UnityEngine.InputSystem.InputControlPath: TControl TryFindChild(InputControl, string, int): undocumented", - "UnityEngine.InputSystem.InputControlPath: bool Matches(string, InputControl): undocumented", - "UnityEngine.InputSystem.InputControlScheme: bool FindControlSchemeForDevices(TDevices, TSchemes, out InputControlScheme, out MatchResult, InputDevice, bool): undocumented", - "UnityEngine.InputSystem.InputControlScheme: MatchResult PickDevicesFrom(TDevices, InputDevice): missing ", - "UnityEngine.InputSystem.InputControlScheme: bool Equals(InputControlScheme): undocumented", - "UnityEngine.InputSystem.InputControlScheme: bool Equals(object): undocumented", - "UnityEngine.InputSystem.InputControlScheme: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.InputControlScheme: string ToString(): undocumented", - "UnityEngine.InputSystem.InputControlScheme: bool op_Equality(InputControlScheme, InputControlScheme): undocumented", - "UnityEngine.InputSystem.InputControlScheme: bool op_Inequality(InputControlScheme, InputControlScheme): undocumented", - "UnityEngine.InputSystem.InputControlScheme.MatchResult: this[int]: undocumented", - "UnityEngine.InputSystem.InputControlScheme.MatchResult.Match: isOptional: undocumented", - "UnityEngine.InputSystem.InputControlScheme.DeviceRequirement: string ToString(): undocumented", - "UnityEngine.InputSystem.InputControlScheme.DeviceRequirement: bool Equals(DeviceRequirement): undocumented", - "UnityEngine.InputSystem.InputControlScheme.DeviceRequirement: bool Equals(object): undocumented", - "UnityEngine.InputSystem.InputControlScheme.DeviceRequirement: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.InputControlScheme.DeviceRequirement: bool op_Equality(DeviceRequirement, DeviceRequirement): undocumented", - "UnityEngine.InputSystem.InputControlScheme.DeviceRequirement: bool op_Inequality(DeviceRequirement, DeviceRequirement): undocumented", - "UnityEngine.InputSystem.InputDevice: wasUpdatedThisFrame: undocumented", - "UnityEngine.InputSystem.InputDevice: long ExecuteCommand(ref TCommand): missing ", - "UnityEngine.InputSystem.InputDevice: long ExecuteCommand(InputDeviceCommand*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommandDelegate: missing ", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommandDelegate: missing ", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommandDelegate: missing ", - "UnityEngine.InputSystem.LowLevel.InputDeviceExecuteCommandDelegate: missing ", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: BaseCommandSize: undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: GenericSuccess: undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: type: undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: sizeInBytes: undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: payloadSizeInBytes: undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: payloadPtr: undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: .ctor(FourCC, int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: NativeArray AllocateNative(FourCC, int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputDeviceCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEvent: .ctor(FourCC, int, int, double): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEvent: handled: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEvent: string ToString(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEvent: bool Equals(InputEvent*, InputEvent*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventBuffer: BufferSizeUnknown: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventBuffer: void Reset(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventBuffer: IEnumerator GetEnumerator(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventBuffer: void Dispose(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventBuffer: InputEventBuffer Clone(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: id: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: type: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: sizeInBytes: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: deviceId: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: time: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: data: undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: bool IsA(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: InputEventPtr Next(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: string ToString(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: bool Equals(InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: bool Equals(object): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: bool op_Equality(InputEventPtr, InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: bool op_Inequality(InputEventPtr, InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: InputEventPtr op_Implicit(InputEvent*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: InputEventPtr From(InputEvent*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: InputEvent* op_Implicit(InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventPtr: InputEvent* FromInputEventPtr(InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventTrace: .ctor(InputDevice, long, bool, long, long): undocumented", - "UnityEngine.InputSystem.LowLevel.InputEventTrace: .ctor(long, bool, long, long): missing ", - "UnityEngine.InputSystem.LowLevel.InputEventTrace: InputEventTrace LoadFrom(string): missing ", - "UnityEngine.InputSystem.LowLevel.InputEventTrace: IEnumerator GetEnumerator(): undocumented", - "UnityEngine.InputSystem.InputInteractionContext: void Performed(): undocumented", - "UnityEngine.InputSystem.InputInteractionContext: void PerformedAndStayStarted(): undocumented", - "UnityEngine.InputSystem.InputInteractionContext: void PerformedAndStayPerformed(): undocumented", - "UnityEngine.InputSystem.InputInteractionContext: void Canceled(): undocumented", - "UnityEngine.InputSystem.InputProcessor: object ProcessAsObject(object, InputControl): undocumented", - "UnityEngine.InputSystem.InputProcessor: void Process(void*, int, InputControl): undocumented", - "UnityEngine.InputSystem.InputRemoting: sending: undocumented", - "UnityEngine.InputSystem.InputRemoting: void StopSending(): undocumented", - "UnityEngine.InputSystem.InputRemoting: IDisposable Subscribe(IObserver): undocumented", - "UnityEngine.InputSystem.InputRemoting: void RemoveRemoteDevices(int): undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: Connect: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: Disconnect: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: NewLayout: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: NewDevice: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: NewEvents: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: RemoveDevice: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: RemoveLayout: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: ChangeUsages: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: StartSending: undocumented", - "UnityEngine.InputSystem.InputRemoting.MessageType: StopSending: undocumented", - "UnityEngine.InputSystem.InputRemoting.Message: type: undocumented", - "UnityEngine.InputSystem.InputRemoting.Message: data: undocumented", - "UnityEngine.InputSystem.LowLevel.InputState: currentTime: undocumented", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputDevice, InputEventPtr, InputUpdateType): undocumented", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, ref TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, ref TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, ref TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, ref TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: void Change(InputControl, ref TState, InputUpdateType, InputEventPtr): missing ", - "UnityEngine.InputSystem.LowLevel.InputState: bool IsIntegerFormat(FourCC): undocumented", - "UnityEngine.InputSystem.LowLevel.InputState: IInputStateChangeMonitor AddChangeMonitor(InputControl, Action, int, Action): undocumented", - "UnityEngine.InputSystem.LowLevel.InputState: void RemoveChangeMonitor(InputControl, IInputStateChangeMonitor, long): undocumented", - "UnityEngine.InputSystem.LowLevel.InputState: void RemoveChangeMonitorTimeout(IInputStateChangeMonitor, long, int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: InvalidOffset: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: AutomaticOffset: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatVector2: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatVector3: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatQuaternion: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatVector2Short: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatVector3Short: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatVector2Byte: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatVector3Byte: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FormatPose: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: int GetSizeOfPrimitiveFormatInBits(FourCC): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: FourCC GetPrimitiveFormatFromType(Type): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: byteOffset: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: bitOffset: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: sizeInBits: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: int ReadInt(void*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: void WriteInt(void*, int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: float ReadFloat(void*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: void WriteFloat(void*, float): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: double ReadDouble(void*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: void WriteDouble(void*, double): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: void Write(void*, PrimitiveValue): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateBlock: void CopyToFrom(void*, void*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: extraMemoryPerRecord: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: updateMask: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: controls: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: this[int]: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: onRecordAdded: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: onShouldRecordStateChange: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: .ctor(int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: .ctor(string): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: .ctor(InputControl): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: .ctor(IEnumerable): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: void Finalize(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: void Clear(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: Record AddRecord(Record): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: void StartRecording(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: void StopRecording(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: Record RecordStateChange(InputControl, InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: Record RecordStateChange(InputControl, void*, double): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: IEnumerator GetEnumerator(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: void Dispose(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: void Destroy(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: int RecordIndexToUserIndex(int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: int UserIndexToRecordIndex(int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: RecordHeader* GetRecord(int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: RecordHeader* AllocateRecord(out int): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: TValue ReadValue(RecordHeader*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: object ReadValueAsObject(RecordHeader*): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: time: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: version: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: controlIndex: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: statePtrWithControlIndex: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: statePtrWithoutControlIndex: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: kSizeWithControlIndex: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.RecordHeader: kSizeWithoutControlIndex: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: valid: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: owner: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: index: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: time: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: control: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: next: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: previous: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: TValue ReadValue(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: object ReadValueAsObject(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: void* GetUnsafeMemoryPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: void* GetUnsafeExtraMemoryPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: void CopyFrom(Record): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: bool Equals(Record): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: bool Equals(object): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: string ToString(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: .ctor(int?): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: .ctor(InputControl): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: .ctor(string): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: void Finalize(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: InputStateHistory.Record AddRecord(InputStateHistory.Record): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: InputStateHistory.Record RecordStateChange(InputControl, TValue, double): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: IEnumerator.Record> GetEnumerator(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory: this[int]: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: valid: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: owner: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: index: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: time: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: control: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: next: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: previous: undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: TValue ReadValue(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: void* GetUnsafeMemoryPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: void* GetUnsafeExtraMemoryPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: void CopyFrom(InputStateHistory.Record): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: bool Equals(InputStateHistory.Record): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: bool Equals(object): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.LowLevel.InputStateHistory.Record: string ToString(): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void AssertButtonPress(InputDevice, TState, params ButtonControl[]): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void AssertStickValues(StickControl, Vector2, float, float, float, float): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Started(InputAction, InputControl, double?, object): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Started(InputAction, InputControl, TValue, double?): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Performed(InputAction, InputControl, double?, double?, object): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Performed(InputAction, InputControl, TValue, double?, double?): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Canceled(InputAction, InputControl, double?, double?, object): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Canceled(InputAction, InputControl, TValue, double?, double?): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Started(InputAction, InputControl, object, double?): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Performed(InputAction, InputControl, object, double?, double?): undocumented", - "UnityEngine.InputSystem.InputTestFixture: ActionConstraint Canceled(InputAction, InputControl, object, double?, double?): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void Press(ButtonControl, double, double, bool): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void Release(ButtonControl, double, double, bool): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void PressAndRelease(ButtonControl, double, double, bool): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void Click(ButtonControl, double, double, bool): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void Move(InputControl, Vector2, Vector2?, double, double, bool): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void BeginTouch(int, Vector2, bool, Touchscreen, double, double, byte): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void BeginTouch(int, Vector2, float, bool, Touchscreen, double, double): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void MoveTouch(int, Vector2, Vector2, bool, Touchscreen, double, double): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void MoveTouch(int, Vector2, float, Vector2, bool, Touchscreen, double, double): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void EndTouch(int, Vector2, Vector2, bool, Touchscreen, double, double, byte): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void EndTouch(int, Vector2, float, Vector2, bool, Touchscreen, double, double): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void CancelTouch(int, Vector2, Vector2, bool, Touchscreen, double, double): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void CancelTouch(int, Vector2, float, Vector2, bool, Touchscreen, double, double): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void SetTouch(int, TouchPhase, Vector2, Vector2, bool, Touchscreen, double, double): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void SetTouch(int, TouchPhase, Vector2, float, Vector2, bool, Touchscreen, double, double, byte): undocumented", - "UnityEngine.InputSystem.InputTestFixture: void Trigger(InputAction, InputControl, TValue): undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: phase: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: time: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: duration: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: action: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: control: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: value: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: interaction: undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: .ctor(InputActionPhase, InputAction, InputControl, object, Type, double?, double?): undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: ConstraintResult ApplyTo(object): undocumented", - "UnityEngine.InputSystem.InputTestFixture.ActionConstraint: ActionConstraint AndThen(ActionConstraint): undocumented", - "UnityEngine.InputSystem.Users.InputUser: InvalidId: undocumented", - "UnityEngine.InputSystem.Users.InputUser: platformUserAccountHandle: undocumented", - "UnityEngine.InputSystem.Users.InputUser: platformUserAccountName: undocumented", - "UnityEngine.InputSystem.Users.InputUser: platformUserAccountId: undocumented", - "UnityEngine.InputSystem.Users.InputUser: string ToString(): undocumented", - "UnityEngine.InputSystem.Users.InputUser: ControlSchemeChangeSyntax ActivateControlScheme(string): undocumented", - "UnityEngine.InputSystem.Users.InputUser: ControlSchemeChangeSyntax ActivateControlScheme(InputControlScheme): undocumented", - "UnityEngine.InputSystem.Users.InputUser: InputUser? FindUserByAccount(InputUserAccountHandle): undocumented", - "UnityEngine.InputSystem.Users.InputUser: InputUser CreateUserWithoutPairedDevices(): undocumented", - "UnityEngine.InputSystem.Users.InputUser: InputUser PerformPairingWithDevice(InputDevice, InputUser, InputUserPairingOptions): missing ", - "UnityEngine.InputSystem.Users.InputUser: bool Equals(InputUser): undocumented", - "UnityEngine.InputSystem.Users.InputUser: bool Equals(object): undocumented", - "UnityEngine.InputSystem.Users.InputUser: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.Users.InputUser: bool op_Equality(InputUser, InputUser): undocumented", - "UnityEngine.InputSystem.Users.InputUser: bool op_Inequality(InputUser, InputUser): undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: handle: undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: .ctor(string, ulong): undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: string ToString(): undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: bool Equals(InputUserAccountHandle): undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: bool Equals(object): undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: bool op_Equality(InputUserAccountHandle, InputUserAccountHandle): undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: bool op_Inequality(InputUserAccountHandle, InputUserAccountHandle): undocumented", - "UnityEngine.InputSystem.Users.InputUserAccountHandle: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.Users.InputUserChange: AccountChanged: undocumented", - "UnityEngine.InputSystem.Users.InputUserChange: AccountNameChanged: undocumented", - "UnityEngine.InputSystem.Users.InputUserChange: AccountSelectionInProgress: undocumented", - "UnityEngine.InputSystem.Users.InputUserChange: AccountSelectionCanceled: undocumented", - "UnityEngine.InputSystem.Users.InputUserChange: AccountSelectionComplete: undocumented", - "UnityEngine.InputSystem.InputValue: TValue Get(): undocumented", - "UnityEngine.InputSystem.InputValue: isPressed: undocumented", - "UnityEngine.InputSystem.Controls.IntegerControl: FourCC CalculateOptimizedControlDataType(): undocumented", - "IntegrationTests: undocumented", - "IntegrationTests: void PreserveMethods(): undocumented", - "IntegrationTests: void Setup(): undocumented", - "IntegrationTests: void TearDown(): undocumented", - "IntegrationTests: void Integration_CanSendAndReceiveEvents(): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: int CompareTo(InternedString): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: string ToString(): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_Equality(InternedString, InternedString): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_Inequality(InternedString, InternedString): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_Equality(InternedString, string): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_Inequality(InternedString, string): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_Equality(string, InternedString): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_Inequality(string, InternedString): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_LessThan(InternedString, InternedString): undocumented", - "UnityEngine.InputSystem.Utilities.InternedString: bool op_GreaterThan(InternedString, InternedString): undocumented", - "UnityEngine.InputSystem.XInput.IXboxOneRumble: void SetMotorSpeeds(float, float, float, float): undocumented", - "UnityEngine.InputSystem.LowLevel.KeyboardState: keys: undocumented", - "UnityEngine.InputSystem.LowLevel.KeyboardState: .ctor(params Key[]): undocumented", - "UnityEngine.InputSystem.LowLevel.KeyboardState: void Set(Key, bool): undocumented", - "UnityEngine.InputSystem.LowLevel.KeyboardState: void Press(Key): undocumented", - "UnityEngine.InputSystem.LowLevel.KeyboardState: void Release(Key): undocumented", - "UnityEngine.InputSystem.LowLevel.KeyboardState: format: undocumented", - "UnityEngine.InputSystem.Key: IMESelected: undocumented", - "UnityEngine.InputSystem.Keyboard: void SetIMEEnabled(bool): missing ", - "UnityEngine.InputSystem.Keyboard: void SetIMECursorPosition(Vector2): missing ", - "UnityEngine.InputSystem.Keyboard: void OnIMECompositionChanged(IMECompositionString): undocumented", - "UnityEngine.InputSystem.Controls.KeyControl: void RefreshConfiguration(): undocumented", - "UnityEngine.InputSystem.Utilities.NameAndParameters: name: undocumented", - "UnityEngine.InputSystem.Utilities.NameAndParameters: parameters: undocumented", - "UnityEngine.InputSystem.Utilities.NameAndParameters: string ToString(): undocumented", - "UnityEngine.InputSystem.Utilities.NameAndParameters: IEnumerable ParseMultiple(string): undocumented", - "UnityEngine.InputSystem.Utilities.NameAndParameters: NameAndParameters Parse(string): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: Separator: undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: type: undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: NamedValue ConvertTo(TypeCode): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: NamedValue From(string, TValue): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: string ToString(): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: bool Equals(NamedValue): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: bool Equals(object): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: bool op_Equality(NamedValue, NamedValue): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: bool op_Inequality(NamedValue, NamedValue): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: NamedValue[] ParseMultiple(string): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: NamedValue Parse(string): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: void ApplyToObject(object): undocumented", - "UnityEngine.InputSystem.Utilities.NamedValue: void ApplyAllToObject(object, TParameterList): undocumented", - "UnityEngine.InputSystem.Composites.OneModifierComposite: float EvaluateMagnitude(ref InputBindingCompositeContext): undocumented", - "UnityEngine.InputSystem.Composites.OneModifierComposite: object ReadValueAsObject(ref InputBindingCompositeContext): undocumented", - "UnityEngine.InputSystem.OnScreen.OnScreenControl: void SendValueToControl(TValue): undocumented", - "UnityEngine.InputSystem.OnScreen.OnScreenControl: void SentDefaultValueToControl(): undocumented", - "UnityEngine.InputSystem.OnScreen.OnScreenControl: void OnEnable(): undocumented", - "UnityEngine.InputSystem.OnScreen.OnScreenControl: void OnDisable(): undocumented", - "UnityEngine.InputSystem.PlayerInput: void SwitchCurrentActionMap(string): undocumented", - "UnityEngine.InputSystem.PlayerInput: void DebugLogAction(CallbackContext): missing ", - "UnityEngine.InputSystem.PlayerInput.ActionEvent: undocumented", - "UnityEngine.InputSystem.PlayerInput.ActionEvent: actionId: undocumented", - "UnityEngine.InputSystem.PlayerInput.ActionEvent: actionName: undocumented", - "UnityEngine.InputSystem.PlayerInput.ActionEvent: .ctor(): undocumented", - "UnityEngine.InputSystem.PlayerInput.ActionEvent: .ctor(InputAction): undocumented", - "UnityEngine.InputSystem.PlayerInput.ActionEvent: .ctor(Guid, string): undocumented", - "UnityEngine.InputSystem.PlayerInputManager: PlayerLeftMessage: undocumented", - "UnityEngine.InputSystem.PlayerInputManager: notificationBehavior: undocumented", - "UnityEngine.InputSystem.PlayerInputManager: playerJoinedEvent: undocumented", - "UnityEngine.InputSystem.PlayerInputManager: playerLeftEvent: undocumented", - "UnityEngine.InputSystem.PlayerInputManager: onPlayerJoined: undocumented", - "UnityEngine.InputSystem.PlayerInputManager: onPlayerLeft: undocumented", - "UnityEngine.InputSystem.PlayerInputManager: void JoinPlayerFromActionIfNotAlreadyJoined(CallbackContext): undocumented", - "UnityEngine.InputSystem.PlayerInputManager.PlayerJoinedEvent: undocumented", - "UnityEngine.InputSystem.PlayerInputManager.PlayerLeftEvent: undocumented", - "UnityEngine.InputSystem.PlayerJoinBehavior: JoinPlayersWhenJoinActionIsTriggered: undocumented", - "UnityEngine.InputSystem.Interactions.PressInteraction: void Process(ref InputInteractionContext): undocumented", - "UnityEngine.InputSystem.Interactions.PressInteraction: void Reset(): undocumented", - "UnityEngine.InputSystem.Utilities.PrimitiveValue: PrimitiveValue FromObject(object): missing ", - "UnityEngine.InputSystem.Controls.QuaternionControl: FourCC CalculateOptimizedControlDataType(): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryCanRunInBackground: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryCanRunInBackground: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryCanRunInBackground: canRunInBackground: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryCanRunInBackground: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryCanRunInBackground: QueryCanRunInBackground Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryDimensionsCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryDimensionsCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryDimensionsCommand: outDimensions: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryDimensionsCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryDimensionsCommand: QueryDimensionsCommand Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryEnabledStateCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryEnabledStateCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryEnabledStateCommand: isEnabled: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryEnabledStateCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryEnabledStateCommand: QueryEnabledStateCommand Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyboardLayoutCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyboardLayoutCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyboardLayoutCommand: nameBuffer: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyboardLayoutCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyboardLayoutCommand: QueryKeyboardLayoutCommand Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyNameCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyNameCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyNameCommand: scanOrKeyCode: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyNameCommand: nameBuffer: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyNameCommand: string ReadKeyName(): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyNameCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryKeyNameCommand: QueryKeyNameCommand Create(Key): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryPairedUserAccountCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryPairedUserAccountCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryPairedUserAccountCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.QueryPairedUserAccountCommand: QueryPairedUserAccountCommand Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.QueryPairedUserAccountCommand.Result: undocumented", - "UnityEngine.InputSystem.Utilities.ReadOnlyArray: ReadOnlyArray.Enumerator GetEnumerator(): missing ", - "UnityEngine.InputSystem.Utilities.ReadOnlyArray: ReadOnlyArray op_Implicit(TValue[]): missing ", - "UnityEngine.InputSystem.LowLevel.RequestResetCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.RequestResetCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.RequestResetCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.RequestResetCommand: RequestResetCommand Create(): undocumented", - "UnityEngine.InputSystem.LowLevel.RequestSyncCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.RequestSyncCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.RequestSyncCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.RequestSyncCommand: RequestSyncCommand Create(): undocumented", - "UnityEngine.InputSystem.Accelerometer: acceleration: undocumented", - "UnityEngine.InputSystem.Gyroscope: angularVelocity: undocumented", - "UnityEngine.InputSystem.GravitySensor: gravity: undocumented", - "UnityEngine.InputSystem.AttitudeSensor: attitude: undocumented", - "UnityEngine.InputSystem.LinearAccelerationSensor: acceleration: undocumented", - "UnityEngine.InputSystem.LowLevel.SetIMECursorPositionCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.SetIMECursorPositionCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.SetIMECursorPositionCommand: position: undocumented", - "UnityEngine.InputSystem.LowLevel.SetIMECursorPositionCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.SetIMECursorPositionCommand: SetIMECursorPositionCommand Create(Vector2): undocumented", - "UnityEngine.InputSystem.LowLevel.SetSamplingFrequencyCommand: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.SetSamplingFrequencyCommand: baseCommand: undocumented", - "UnityEngine.InputSystem.LowLevel.SetSamplingFrequencyCommand: frequency: undocumented", - "UnityEngine.InputSystem.LowLevel.SetSamplingFrequencyCommand: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.SetSamplingFrequencyCommand: SetSamplingFrequencyCommand Create(float): undocumented", - "UnityEngine.InputSystem.Interactions.SlowTapInteraction: void Process(ref InputInteractionContext): undocumented", - "UnityEngine.InputSystem.Interactions.SlowTapInteraction: void Reset(): undocumented", - "UnityEngine.InputSystem.LowLevel.StateEvent: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.StateEvent: baseEvent: undocumented", - "UnityEngine.InputSystem.LowLevel.StateEvent: stateSizeInBytes: undocumented", - "UnityEngine.InputSystem.LowLevel.StateEvent: state: undocumented", - "UnityEngine.InputSystem.LowLevel.StateEvent: InputEventPtr ToEventPtr(): undocumented", - "UnityEngine.InputSystem.LowLevel.StateEvent: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.StateEvent: int GetEventSizeWithPayload(): undocumented", - "UnityEngine.InputSystem.Controls.StickControl: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Processors.StickDeadzoneProcessor: max: undocumented", - "UnityEngine.InputSystem.Processors.StickDeadzoneProcessor: Vector2 Process(Vector2, InputControl): undocumented", - "UnityEngine.InputSystem.Processors.StickDeadzoneProcessor: string ToString(): undocumented", - "UnityEngine.InputSystem.Interactions.TapInteraction: void Process(ref InputInteractionContext): undocumented", - "UnityEngine.InputSystem.Interactions.TapInteraction: void Reset(): undocumented", - "UnityEngine.InputSystem.LowLevel.TextEvent: Type: undocumented", - "UnityEngine.InputSystem.LowLevel.TextEvent: baseEvent: undocumented", - "UnityEngine.InputSystem.LowLevel.TextEvent: typeStatic: undocumented", - "UnityEngine.InputSystem.LowLevel.TextEvent: TextEvent* From(InputEventPtr): undocumented", - "UnityEngine.InputSystem.LowLevel.TextEvent: TextEvent Create(int, char, double): undocumented", - "UnityEngine.InputSystem.LowLevel.TextEvent: TextEvent Create(int, int, double): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.Touch: string ToString(): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.Touch: bool Equals(Touch): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.Touch: bool Equals(object): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.Touch: int GetHashCode(): undocumented", - "UnityEngine.InputSystem.Controls.TouchPressControl: void WriteValueIntoState(float, void*): undocumented", - "UnityEngine.InputSystem.LowLevel.TouchState: tapCount: undocumented", - "UnityEngine.InputSystem.LowLevel.TouchState: flags: undocumented", - "UnityEngine.InputSystem.LowLevel.TouchState: isNoneEndedOrCanceled: undocumented", - "UnityEngine.InputSystem.LowLevel.TouchState: isInProgress: undocumented", - "UnityEngine.InputSystem.LowLevel.TouchState: isIndirectTouch: undocumented", - "UnityEngine.InputSystem.LowLevel.TouchState: isTap: undocumented", - "UnityEngine.InputSystem.Touchscreen: touchControlArray: undocumented", - "UnityEngine.InputSystem.Touchscreen: void OnNextUpdate(): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: simulatedTouchscreen: undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: instance: undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void Enable(): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void Disable(): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void Destroy(): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void AddPointer(Pointer): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void RemovePointer(Pointer): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void OnEnable(): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void OnDisable(): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void InstallStateChangeMonitors(int): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void OnSourceControlChangedValue(InputControl, double, InputEventPtr, long): undocumented", - "UnityEngine.InputSystem.EnhancedTouch.TouchSimulation: void UninstallStateChangeMonitors(int): undocumented", - "UnityEngine.InputSystem.TrackedDevice: trackingState: undocumented", - "UnityEngine.InputSystem.TrackedDevice: isTracked: undocumented", - "UnityEngine.InputSystem.TrackedDevice: devicePosition: undocumented", - "UnityEngine.InputSystem.TrackedDevice: deviceRotation: undocumented", - "UnityEngine.InputSystem.TrackedDevice: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Composites.TwoModifiersComposite: float EvaluateMagnitude(ref InputBindingCompositeContext): undocumented", - "UnityEngine.InputSystem.Composites.TwoModifiersComposite: object ReadValueAsObject(ref InputBindingCompositeContext): undocumented", - "UnityEngine.InputSystem.Controls.Vector2Control: FourCC CalculateOptimizedControlDataType(): undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: x: undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: y: undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: z: undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: .ctor(): undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: void FinishSetup(): undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: Vector3 ReadUnprocessedValueFromState(void*): undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: void WriteValueIntoState(Vector3, void*): undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: float EvaluateMagnitude(void*): undocumented", - "UnityEngine.InputSystem.Controls.Vector3Control: FourCC CalculateOptimizedControlDataType(): undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: Unknown: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: Gamepad: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: Wheel: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: ArcadeStick: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: FlightStick: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: DancePad: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: Guitar: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: GuitarAlternate: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: DrumKit: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: GuitarBass: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceSubType: ArcadePad: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceFlags: ForceFeedbackSupported: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceFlags: Wireless: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceFlags: VoiceSupported: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceFlags: PluginModulesSupported: undocumented", - "UnityEngine.InputSystem.XInput.XInputController.DeviceFlags: NoNavigation: undocumented" - ] } } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithOneModifier.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithOneModifier.cs index 75d6f333a3..15f005c397 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithOneModifier.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithOneModifier.cs @@ -185,6 +185,7 @@ public override float EvaluateMagnitude(ref InputBindingCompositeContext context return ReadValue(ref context); } + /// Resolves the modifier and button binding references after setup. protected override void FinishSetup(ref InputBindingCompositeContext context) { if (modifiersOrder == ModifiersOrder.Default) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithTwoModifiers.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithTwoModifiers.cs index fcce470071..4d799d7ae1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithTwoModifiers.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/ButtonWithTwoModifiers.cs @@ -200,6 +200,7 @@ public override float EvaluateMagnitude(ref InputBindingCompositeContext context return ReadValue(ref context); } + /// Resolves the modifier and button binding references after setup. protected override void FinishSetup(ref InputBindingCompositeContext context) { if (modifiersOrder == ModifiersOrder.Default) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/OneModifierComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/OneModifierComposite.cs index 15c720145b..c8d11805b1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/OneModifierComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/OneModifierComposite.cs @@ -168,6 +168,7 @@ public enum ModifiersOrder private Type m_ValueType; private bool m_BindingIsButton; + /// Returns 0 if the modifier is not held, otherwise returns the button's magnitude. public override float EvaluateMagnitude(ref InputBindingCompositeContext context) { if (ModifierIsPressed(ref context)) @@ -218,6 +219,7 @@ protected override void FinishSetup(ref InputBindingCompositeContext context) } } + /// Returns the composite's value as a boxed object, or 0 if the modifier is not held. public override object ReadValueAsObject(ref InputBindingCompositeContext context) { if (context.ReadValueAsButton(modifier)) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/TwoModifiersComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/TwoModifiersComposite.cs index 8044a628e4..d43ee57fe5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/TwoModifiersComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/TwoModifiersComposite.cs @@ -177,6 +177,7 @@ public enum ModifiersOrder private Type m_ValueType; private bool m_BindingIsButton; + /// Returns 0 if either modifier is not held, otherwise returns the button's magnitude. public override float EvaluateMagnitude(ref InputBindingCompositeContext context) { if (ModifiersArePressed(ref context)) @@ -228,6 +229,7 @@ protected override void FinishSetup(ref InputBindingCompositeContext context) } } + /// Returns the composite's value as a boxed object, or 0 if either modifier is not held. public override object ReadValueAsObject(ref InputBindingCompositeContext context) { if (context.ReadValueAsButton(modifier1) && context.ReadValueAsButton(modifier2)) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionParameters.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionParameters.cs index bae49a62e6..25f6e00f4c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionParameters.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionParameters.cs @@ -155,6 +155,8 @@ partial class InputActionRebindingExtensions /// /// /// is null -or- is null + /// The type of the interaction or processor that owns the parameter. + /// The type of the parameter value. /// public static unsafe TValue? GetParameterValue(this InputAction action, Expression> expr, InputBinding bindingMask = default) where TValue : struct @@ -201,6 +203,8 @@ partial class InputActionRebindingExtensions /// bindings that match (see ) the given mask will have the override applied to them. /// is null -or- is null /// or empty. + /// The type of the interaction or processor that owns the parameter. + /// The type of the parameter value. /// /// This method is a variation of /// that encapsulates a reference to the name of the parameter and the type of object it is found on in a way that is @@ -248,6 +252,8 @@ public static void ApplyParameterOverride(this InputAction acti /// bindings that match (see ) the given mask will have the override applied to them. /// is null -or- is null /// or empty. + /// The type of the interaction or processor that owns the parameter. + /// The type of the parameter value. /// /// This method is a variation of /// that encapsulates a reference to the name of the parameter and the type of object it is found on in a way that is @@ -294,6 +300,8 @@ public static void ApplyParameterOverride(this InputActionMap a /// bindings that match (see ) the given mask will have the override applied to them. /// is null -or- is null /// or empty. + /// The type of the interaction or processor that owns the parameter. + /// The type of the parameter value. /// /// This method is a variation of /// that encapsulates a reference to the name of the parameter and the type of object it is found on in a way that is diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionRebindingExtensions.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionRebindingExtensions.cs index 26dc558ffe..512a540d2f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionRebindingExtensions.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionRebindingExtensions.cs @@ -901,6 +901,7 @@ public static void RemoveAllBindingOverrides(this InputAction action) ////REVIEW: are the IEnumerable variations worth having? + /// Applies all the binding overrides in the given collection to the action map. public static void ApplyBindingOverrides(this InputActionMap actionMap, IEnumerable overrides) { if (actionMap == null) @@ -912,6 +913,7 @@ public static void ApplyBindingOverrides(this InputActionMap actionMap, IEnumera ApplyBindingOverride(actionMap, binding); } + /// Removes all binding overrides from the action map that match the bindings in the given collection. public static void RemoveBindingOverrides(this InputActionMap actionMap, IEnumerable overrides) { if (actionMap == null) @@ -1363,6 +1365,7 @@ private static void LoadBindingOverridesFromJsonInternal(this IInputActionCollec /// public sealed class RebindingOperation : IDisposable { + /// The default minimum magnitude that an input must have to be accepted as a candidate during rebinding. public const float kDefaultMagnitudeThreshold = 0.2f; /// @@ -1480,8 +1483,10 @@ public InputControl selectedControl /// public bool canceled => (m_Flags & Flags.Canceled) != 0; + /// The time at which the rebinding operation was started, in seconds since startup. public double startTime => m_StartTime; + /// How long to wait without receiving any input before canceling the rebind, in seconds. public float timeout => m_Timeout; /// @@ -1565,6 +1570,7 @@ public RebindingOperation WithAction(InputAction action) /// See for how this configuration relates to suppressing /// actions during rebind. /// + /// If true, input events that match the expected control type are consumed and not passed further. public RebindingOperation WithMatchingEventsBeingSuppressed(bool value = true) { ThrowIfRebindInProgress(); @@ -1605,6 +1611,7 @@ public RebindingOperation WithCancelingThrough(string binding) return this; } + /// Cancels the rebinding operation if the given control is actuated. public RebindingOperation WithCancelingThrough(InputControl control) { ThrowIfRebindInProgress(); @@ -1613,6 +1620,7 @@ public RebindingOperation WithCancelingThrough(InputControl control) return WithCancelingThrough(control.path); } + /// Restricts the rebinding to only accept controls whose layout matches the given layout name. public RebindingOperation WithExpectedControlType(string layoutName) { ThrowIfRebindInProgress(); @@ -1620,6 +1628,7 @@ public RebindingOperation WithExpectedControlType(string layoutName) return this; } + /// Restricts the rebinding to only accept controls of the given C# type. public RebindingOperation WithExpectedControlType(Type type) { ThrowIfRebindInProgress(); @@ -1629,6 +1638,7 @@ public RebindingOperation WithExpectedControlType(Type type) return this; } + /// Restricts the rebinding to only accept controls of the type parameter's C# type. public RebindingOperation WithExpectedControlType() where TControl : InputControl { diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionReference.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionReference.cs index f55c729f27..3a92e0c91c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionReference.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionReference.cs @@ -241,9 +241,7 @@ internal void Invalidate() /// [NonSerialized] private InputAction m_Action; - /// - /// Equivalent to . - /// + /// Resolves and returns the referenced . /// The associated action reference if its a valid reference, else null. public InputAction ToInputAction() { diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs index df13f2979e..97ae6ce19f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs @@ -1075,6 +1075,7 @@ public static InputControlScheme WithBindingGroup(this InputControlScheme scheme return new ControlSchemeSyntax(scheme).WithBindingGroup(bindingGroup).Done(); } + /// Adds a device requirement with the given path to the control scheme and returns the updated scheme. public static InputControlScheme WithDevice(this InputControlScheme scheme, string controlPath, bool required) { #if UNITY_EDITOR @@ -1086,6 +1087,7 @@ public static InputControlScheme WithDevice(this InputControlScheme scheme, stri return new ControlSchemeSyntax(scheme).WithOptionalDevice(controlPath).Done(); } + /// Adds a required device requirement with the given path and returns the updated scheme. public static InputControlScheme WithRequiredDevice(this InputControlScheme scheme, string controlPath) { #if UNITY_EDITOR @@ -1095,6 +1097,7 @@ public static InputControlScheme WithRequiredDevice(this InputControlScheme sche return new ControlSchemeSyntax(scheme).WithRequiredDevice(controlPath).Done(); } + /// Adds an optional device requirement with the given path and returns the updated scheme. public static InputControlScheme WithOptionalDevice(this InputControlScheme scheme, string controlPath) { #if UNITY_EDITOR @@ -1104,6 +1107,7 @@ public static InputControlScheme WithOptionalDevice(this InputControlScheme sche return new ControlSchemeSyntax(scheme).WithOptionalDevice(controlPath).Done(); } + /// Appends a required device requirement as an alternative (OR condition) and returns the updated scheme. public static InputControlScheme OrWithRequiredDevice(this InputControlScheme scheme, string controlPath) { #if UNITY_EDITOR @@ -1113,6 +1117,7 @@ public static InputControlScheme OrWithRequiredDevice(this InputControlScheme sc return new ControlSchemeSyntax(scheme).OrWithRequiredDevice(controlPath).Done(); } + /// Appends an optional device requirement as an alternative (OR condition) and returns the updated scheme. public static InputControlScheme OrWithOptionalDevice(this InputControlScheme scheme, string controlPath) { #if UNITY_EDITOR diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputBinding.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputBinding.cs index 45b4c3806c..d11d0738f4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputBinding.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputBinding.cs @@ -398,6 +398,7 @@ public InputBinding(string path, string action = null, string groups = null, str m_OverrideProcessors = default; } + /// Returns the name portion of the composite path, or null if this is not a composite binding. public string GetNameOfComposite() { if (!isComposite) @@ -417,11 +418,13 @@ internal void RemoveOverrides() m_OverrideProcessors = null; } + /// Returns a copy of this binding with groups set to only the given group. public static InputBinding MaskByGroup(string group) { return new InputBinding {groups = group}; } + /// Returns a copy of this binding with groups set to only the given groups. public static InputBinding MaskByGroups(params string[] groups) { return new InputBinding {groups = string.Join(kSeparatorString, groups.Where(x => !string.IsNullOrEmpty(x)))}; @@ -697,6 +700,8 @@ public string ToDisplayString(DisplayStringOptions options = default, InputContr /// /// /// + /// Output: the name of the device layout this binding targets. + /// Output: the path of the control within the device. public string ToDisplayString(out string deviceLayoutName, out string controlPath, DisplayStringOptions options = default, InputControl control = default) { diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingComposite.cs index 72db218f66..09fdbe56c1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingComposite.cs @@ -133,6 +133,7 @@ public virtual float EvaluateMagnitude(ref InputBindingCompositeContext context) /// /// /// + /// The context used to resolve bindings during setup. protected virtual void FinishSetup(ref InputBindingCompositeContext context) { } diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingCompositeContext.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingCompositeContext.cs index c3ef444589..29f8fc52cc 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingCompositeContext.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputBindingCompositeContext.cs @@ -69,6 +69,7 @@ public IEnumerable controls } } + /// Returns the magnitude of the value for the binding part at the given index. public float EvaluateMagnitude(int partNumber) { return m_State.EvaluateCompositePartMagnitude(m_BindingIndex, partNumber); @@ -312,11 +313,13 @@ public unsafe bool ReadValueAsButton(int partNumber) return buttonValue; } + /// Reads the value of the binding part at the given index into the given buffer. public unsafe void ReadValue(int partNumber, void* buffer, int bufferSize) { m_State?.ReadCompositePartValue(m_BindingIndex, partNumber, buffer, bufferSize); } + /// Returns the value of the binding part at the given index as a boxed object. public object ReadValueAsObject(int partNumber) { return m_State.ReadCompositePartValueAsObject(m_BindingIndex, partNumber); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputControlScheme.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputControlScheme.cs index 7508bb984c..8bba5d3059 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputControlScheme.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputControlScheme.cs @@ -238,6 +238,7 @@ internal void SetNameAndBindingGroup(string name, string bindingGroup = null) return controlScheme; } + /// Searches the given collection of schemes for one that matches all the given devices and returns it via the out parameter. public static bool FindControlSchemeForDevices(TDevices devices, TSchemes schemes, out InputControlScheme controlScheme, out MatchResult matchResult, InputDevice mustIncludeDevice = null, bool allowUnsuccessfulMatch = false) where TDevices : IReadOnlyList @@ -351,6 +352,7 @@ public bool SupportsDevice(InputDevice device) /// Note that the device must be present in the list also. /// A structure containing the result of the pick. Note that this structure /// must be manually disposed or unmanaged memory will be leaked. + /// Type of the device collection to pick from. /// /// Does not allocate managed memory. /// @@ -551,6 +553,7 @@ public MatchResult PickDevicesFrom(TDevices devices, InputDevice favor }; } + /// Returns true if this scheme is equal to the given scheme. public bool Equals(InputControlScheme other) { if (!(string.Equals(m_Name, other.m_Name, StringComparison.InvariantCultureIgnoreCase) && @@ -584,6 +587,7 @@ public bool Equals(InputControlScheme other) return true; } + /// Returns true if the given object is an equal to this one. public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) @@ -592,6 +596,7 @@ public override bool Equals(object obj) return obj is InputControlScheme && Equals((InputControlScheme)obj); } + /// Returns a hash code for this scheme. public override int GetHashCode() { unchecked @@ -603,6 +608,7 @@ public override int GetHashCode() } } + /// Returns a string representation of this scheme. public override string ToString() { if (string.IsNullOrEmpty(m_Name)) @@ -629,11 +635,13 @@ public override string ToString() return builder.ToString(); } + /// Returns true if both schemes are equal. public static bool operator==(InputControlScheme left, InputControlScheme right) { return left.Equals(right); } + /// Returns true if the two schemes are not equal. public static bool operator!=(InputControlScheme left, InputControlScheme right) { return !left.Equals(right); @@ -741,6 +749,7 @@ public InputControlList devices } } + /// Returns the at the given index. public Match this[int index] { get @@ -853,6 +862,7 @@ public InputDevice device /// public DeviceRequirement requirement => m_Requirements[m_RequirementIndex]; + /// True if this requirement was optional and not fulfilled by any device. public bool isOptional => requirement.isOptional; internal int m_RequirementIndex; @@ -1016,6 +1026,7 @@ internal enum Flags Or = 1 << 1, } + /// Returns a string representation of this requirement. public override string ToString() { if (!string.IsNullOrEmpty(controlPath)) @@ -1028,12 +1039,14 @@ public override string ToString() return base.ToString(); } + /// Returns true if this requirement is equal to the given one. public bool Equals(DeviceRequirement other) { return string.Equals(m_ControlPath, other.m_ControlPath) && m_Flags == other.m_Flags && string.Equals(controlPath, other.controlPath) && isOptional == other.isOptional; } + /// Returns true if the given object is a equal to this one. public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) @@ -1042,6 +1055,7 @@ public override bool Equals(object obj) return obj is DeviceRequirement && Equals((DeviceRequirement)obj); } + /// Returns a hash code for this requirement. public override int GetHashCode() { unchecked @@ -1054,11 +1068,13 @@ public override int GetHashCode() } } + /// Returns true if both requirements are equal. public static bool operator==(DeviceRequirement left, DeviceRequirement right) { return left.Equals(right); } + /// Returns true if the two requirements are not equal. public static bool operator!=(DeviceRequirement left, DeviceRequirement right) { return !left.Equals(right); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs index 7c63fe1375..171d895c44 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs @@ -64,6 +64,7 @@ public class PressInteraction : IInputInteraction private float releasePointOrDefault => pressPointOrDefault * ButtonControl.s_GlobalDefaultButtonReleaseThreshold; private bool m_WaitingForRelease; + /// Processes the current input context and transitions the interaction state as needed. public void Process(ref InputInteractionContext context) { var actuation = context.ComputeMagnitude(); @@ -151,6 +152,7 @@ public void Process(ref InputInteractionContext context) } } + /// Resets the interaction to its initial state. public void Reset() { m_WaitingForRelease = false; diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs index 1ad15871ad..0bdff49185 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs @@ -43,6 +43,7 @@ public class SlowTapInteraction : IInputInteraction private double m_SlowTapStartTime; + /// Processes the current input context and transitions the interaction state as needed. public void Process(ref InputInteractionContext context) { if (context.isWaiting && context.ControlIsActuated(pressPointOrDefault)) @@ -62,6 +63,7 @@ public void Process(ref InputInteractionContext context) } } + /// Resets the interaction to its initial state. public void Reset() { m_SlowTapStartTime = 0.0; diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs index 622f6ce107..dfe8453c67 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs @@ -45,6 +45,7 @@ public class TapInteraction : IInputInteraction ////TODO: make sure 2d doesn't move too far + /// Processes the current input context and transitions the interaction state as needed. public void Process(ref InputInteractionContext context) { if (context.timerHasExpired) @@ -88,6 +89,7 @@ public void Process(ref InputInteractionContext context) } } + /// Resets the interaction to its initial state. public void Reset() { m_TapStartTime = 0; diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/AxisControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/AxisControl.cs index d584108efc..0f29554ae9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/AxisControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/AxisControl.cs @@ -228,6 +228,7 @@ public AxisControl() m_StateBlock.format = InputStateBlock.FormatFloat; } + /// Resolves child controls and cached references after the control hierarchy is built. protected override void FinishSetup() { base.FinishSetup(); @@ -310,6 +311,7 @@ private float EvaluateMagnitude(float value) return NormalizeProcessor.Normalize(clampedValue, min, max, 0); } + /// Returns the FourCC type code of the optimized data format for this axis control. protected override FourCC CalculateOptimizedControlDataType() { var noProcessingNeeded = diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs index dee118c96e..e0dd5d8675 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs @@ -322,6 +322,7 @@ public bool wasPressedThisFrame /// } /// /// + /// True if the button was released during the current frame. public bool wasReleasedThisFrame { get diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/DeltaControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/DeltaControl.cs index d84a1ae86d..4f552860ec 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/DeltaControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/DeltaControl.cs @@ -57,6 +57,7 @@ public class DeltaControl : Vector2Control [Preserve] public AxisControl right { get; set; } + /// Resolves child controls after the control hierarchy is built. protected override void FinishSetup() { base.FinishSetup(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/DiscreteButtonControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/DiscreteButtonControl.cs index bb9bcfc228..a899f8fe49 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/DiscreteButtonControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/DiscreteButtonControl.cs @@ -79,6 +79,7 @@ public class DiscreteButtonControl : ButtonControl /// public WriteMode writeMode; + /// Resolves required child or sibling controls after the control hierarchy is built. protected override void FinishSetup() { base.FinishSetup(); @@ -88,6 +89,7 @@ protected override void FinishSetup() $"Non-integer format '{stateBlock.format}' is not supported for DiscreteButtonControl '{this}'"); } + /// Reads the raw button value from the given state buffer and returns it as a float. public override unsafe float ReadUnprocessedValueFromState(void* statePtr) { var valuePtr = (byte*)statePtr + (int)m_StateBlock.byteOffset; @@ -114,6 +116,7 @@ public override unsafe float ReadUnprocessedValueFromState(void* statePtr) return Preprocess(value); } + /// Writes the given float value into the state buffer at this control's bit position. public override unsafe void WriteValueIntoState(float value, void* statePtr) { if (writeMode == WriteMode.WriteNullAndMaxValue) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/DpadControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/DpadControl.cs index 51b919e74d..e7e521b3c6 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/DpadControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/DpadControl.cs @@ -18,10 +18,13 @@ namespace UnityEngine.InputSystem.Controls public class DpadControl : Vector2Control { [InputControlLayout(hideInUI = true)] + /// Internal control representing one axis of a D-pad, derived from the button states. public class DpadAxisControl : AxisControl { + /// Which D-pad component (up/down/left/right) this axis control reads from. public int component { get; set; } + /// Resolves the parent D-pad control reference after the hierarchy is built. protected override void FinishSetup() { base.FinishSetup(); @@ -33,6 +36,7 @@ protected override void FinishSetup() m_StateBlock = m_Parent.m_StateBlock; } + /// Reads the axis value for this D-pad component from the given state buffer. public override unsafe float ReadUnprocessedValueFromState(void* statePtr) { var value = ((DpadControl)m_Parent).ReadUnprocessedValueFromState(statePtr); @@ -72,12 +76,14 @@ public override unsafe float ReadUnprocessedValueFromState(void* statePtr) ////TODO: should have X and Y child controls as well + /// Initializes a new DpadControl. public DpadControl() { m_StateBlock.sizeInBits = 4; m_StateBlock.format = InputStateBlock.FormatBit; } + /// Resolves child button controls after the control hierarchy is built. protected override void FinishSetup() { up = GetChildControl("up"); @@ -87,6 +93,7 @@ protected override void FinishSetup() base.FinishSetup(); } + /// Reads the raw D-pad direction from the given state buffer as a normalized Vector2. public override unsafe Vector2 ReadUnprocessedValueFromState(void* statePtr) { var upIsPressed = up.ReadValueFromStateWithCaching(statePtr) >= up.pressPointOrDefault; @@ -97,6 +104,7 @@ public override unsafe Vector2 ReadUnprocessedValueFromState(void* statePtr) return MakeDpadVector(upIsPressed, downIsPressed, leftIsPressed, rightIsPressed); } + /// Writes the given Vector2 direction into the state buffer. public override unsafe void WriteValueIntoState(Vector2 value, void* statePtr) { var upIsPressed = up.IsValueConsideredPressed(value.y); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs index 9cdc7734f8..764b4472c5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs @@ -278,7 +278,7 @@ public string path new ReadOnlyArray(m_Device.m_UsagesForEachControl, m_UsageStartIndex, m_UsageCount); /// - /// List of alternate names for the control. + /// Alternative names by which this control can be looked up via . /// /// /// List of aliased alternate names for the control. @@ -288,7 +288,7 @@ public string path new ReadOnlyArray(m_Device.m_AliasesForEachControl, m_AliasStartIndex, m_AliasCount); /// - /// Information about where the control stores its state, such as format, offset and size. + /// Describes the memory layout of this control's state within the device state buffer. /// public InputStateBlock stateBlock => m_StateBlock; @@ -370,7 +370,7 @@ internal set /// /// Fetch a control from the control's hierarchy by name. /// - /// A control path. See . + /// Path of the child control to retrieve. /// /// Note that matching is case-insensitive. /// (see ). @@ -498,7 +498,7 @@ public virtual unsafe float EvaluateMagnitude(void* statePtr) } /// - /// Read the control's final, processed value from the given buffer and return the value as an object. + /// Reads this control's value from the given raw state buffer and returns it as a boxed object. /// /// Buffer to read the value from. /// Size of in bytes, which must be large enough to store the value. @@ -636,7 +636,7 @@ public InputControl TryGetChildControl(string path) } /// - /// Try to find a child control matching the given path. + /// Attempts to find and return a child control of the given type at the given path, or null if not found. /// /// A control path. See . /// The type of control to locate. @@ -667,7 +667,7 @@ public TControl TryGetChildControl(string path) } /// - /// Find a child control matching the given path. + /// Returns the child control at the given path, throwing if not found. /// /// A control path. See . /// The first direct or indirect child control that matches the given @@ -692,7 +692,7 @@ public InputControl GetChildControl(string path) } /// - /// Find a child control matching the given path. + /// Returns the child control of the given type at the given path, throwing if not found. /// /// A control path. See . /// The type of control to locate. @@ -718,7 +718,7 @@ public TControl GetChildControl(string path) } /// - /// Constructor for the InputControl + /// Initializes a new control. Called by the input system when building the device hierarchy. /// /// /// Constructor for the InputControl @@ -838,7 +838,7 @@ protected void RefreshConfigurationIfNeeded() } /// - /// Refresh the configuration of the control. This is used to update the control's state (e.g. Keyboard Layout or display Name of Keys). + /// Called to refresh any configuration that the control may have cached from the underlying device. /// /// /// The system will call this method automatically whenever a change is made to one of the control's configuration properties. @@ -902,13 +902,13 @@ protected virtual void RefreshConfiguration() ////TODO: drop protected access /// - /// Information about a memory region storing input state. + /// The underlying state block describing this control's memory layout. /// protected internal InputStateBlock m_StateBlock; ////REVIEW: shouldn't these sit on the device? /// - /// The state data buffer for the device. + /// Pointer to the current state buffer for this control's device. /// /// /// The state data buffer for the device. @@ -916,7 +916,7 @@ protected virtual void RefreshConfiguration() protected internal unsafe void* currentStatePtr => InputStateBuffers.GetFrontBufferForDevice(GetDeviceIndex()); /// - /// The state data buffer for the device from the previous frame. + /// Pointer to the previous frame's state buffer for this control's device. /// /// /// The state data buffer for the device from the previous frame. @@ -924,7 +924,7 @@ protected virtual void RefreshConfiguration() protected internal unsafe void* previousFrameStatePtr => InputStateBuffers.GetBackBufferForDevice(GetDeviceIndex()); /// - /// The default state data buffer + /// Pointer to the default state buffer for this control's device. /// /// /// Buffer that has state for each device initialized with default values. @@ -1027,7 +1027,7 @@ protected internal uint stateOffsetRelativeToDeviceRoot /// This method is for internal use only, you should not call this from your own code. /// /// - /// An optimized data type that can represent a control's value in memory directly. + /// The FourCC type code of the optimized data format, or default if no optimization applies. /// protected virtual FourCC CalculateOptimizedControlDataType() { @@ -1288,10 +1288,10 @@ internal virtual IEnumerable GetProcessors() public abstract class InputControl : InputControl where TValue : struct { - /// + /// The C# type of the value this control returns. public override Type valueType => typeof(TValue); - /// + /// The size in bytes of the value this control returns. public override int valueSizeInBytes => UnsafeUtility.SizeOf(); /// @@ -1475,7 +1475,7 @@ public TValue ReadDefaultValue() } /// - /// Get the control's default value. + /// Reads and returns the processed value of this control from the given raw state buffer. /// /// State containing the control's . /// The control's default value. @@ -1520,7 +1520,7 @@ public unsafe TValue ReadUnprocessedValueFromStateWithCaching(void* statePtr) } /// - /// Read value from control + /// Reads and returns the raw, unprocessed value of this control from the current state. /// /// The controls current value. /// @@ -1533,7 +1533,7 @@ public TValue ReadUnprocessedValue() } /// - /// Read value from provided . + /// Reads and returns the raw, unprocessed value of this control from the given state buffer. /// /// State pointer to read from. /// The controls current value. @@ -1568,7 +1568,7 @@ public override unsafe void ReadValueFromStateIntoBuffer(void* statePtr, void* b UnsafeUtility.MemCpy(bufferPtr, valuePtr, numBytes); } - /// + /// Copies a value from a raw byte buffer into the device state buffer. public override unsafe void WriteValueFromBufferIntoState(void* bufferPtr, int bufferSize, void* statePtr) { if (bufferPtr == null) @@ -1607,7 +1607,7 @@ public override unsafe void WriteValueFromObjectIntoState(object value, void* st } /// - /// Write a value into state at the given memory. + /// Writes the given value into the given state buffer. /// /// Value for the control to store in the state. /// State containing the control's . Will receive @@ -1659,7 +1659,7 @@ private static unsafe bool CompareValue(ref TValue firstValue, ref TValue second } /// - /// Compared values in state buffers. + /// Returns true if the value at the two given state pointers differs by more than the noisy threshold. /// /// The first state buffer to read value from. /// The second state buffer to read value from. @@ -1675,7 +1675,7 @@ public override unsafe bool CompareValue(void* firstStatePtr, void* secondStateP } /// - /// Applies all control processors to the passed value. + /// Applies all processors registered on this control to the given value and returns the result. /// /// value to run processors on. /// The processed value. @@ -1774,7 +1774,7 @@ internal override IEnumerable GetProcessors() internal bool evaluateProcessorsEveryRead = false; - /// + /// Called after the control hierarchy has been built to allow the control to perform any final setup steps. protected override void FinishSetup() { foreach (var processor in m_ProcessorStack) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlAttribute.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlAttribute.cs index acf62fc7b0..191c584b8a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlAttribute.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlAttribute.cs @@ -221,8 +221,10 @@ public sealed class InputControlAttribute : PropertyAttribute [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "According to MSDN, this message can be ignored for attribute parameters, as there are no better alternatives.")] public string[] aliases { get; set; } + /// Name of another control whose state memory this control should read from. public string useStateFrom { get; set; } + /// The bit offset within the control's byte offset. public uint bit { get; set; } = InputStateBlock.InvalidOffset; /// @@ -283,6 +285,7 @@ public sealed class InputControlAttribute : PropertyAttribute /// public uint sizeInBits { get; set; } + /// If greater than zero, this attribute creates an array of controls with this many elements. public int arraySize { get; set; } /// @@ -347,6 +350,7 @@ public sealed class InputControlAttribute : PropertyAttribute /// This is null by default in which case no lower bound is applied to the TODO /// public object minValue { get; set; } + /// The maximum value the control can report. public object maxValue { get; set; } } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlExtensions.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlExtensions.cs index 10eeb4386e..cbc37caf03 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlExtensions.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlExtensions.cs @@ -28,6 +28,7 @@ public static class InputControlExtensions /// itself or one of its parents. If no such control was found, /// returns null. /// is null. + /// The first ancestor control of type , or null if none is found. public static TControl FindInParentChain(this InputControl control) where TControl : InputControl { @@ -119,7 +120,8 @@ public static bool IsActuated(this InputControl control, float threshold = 0) /// /// Read the current value of the control and return it as an object. /// - /// + /// The control to read the value from. + /// The current value of the control as a boxed object. /// /// This method allocates GC memory and thus may cause garbage collection when used during gameplay. /// @@ -139,6 +141,7 @@ public static unsafe object ReadValueAsObject(this InputControl control) /// /// Read the current, processed value of the control and store it into the given memory buffer. /// + /// The control to read the value from. /// Buffer to store value in. Note that the value is not stored with the offset /// found in of the control's . It will /// be stored directly at the given address. @@ -249,6 +252,11 @@ public static unsafe object ReadValueFromEventAsObject(this InputControl control return control.ReadValueFromStateAsObject(statePtr); } + /// Reads the unprocessed value of the given control from the given event and returns it. + /// The control to read the value from. + /// The event to read the value from. + /// The unprocessed value of the control as found in the event. + /// The type of value to read. public static TValue ReadUnprocessedValueFromEvent(this InputControl control, InputEventPtr eventPtr) where TValue : struct { @@ -260,6 +268,12 @@ public static TValue ReadUnprocessedValueFromEvent(this InputControlAttempts to read the unprocessed value of the given control from the given event. + /// The control to read the value from. + /// The event to read the value from. + /// Receives the unprocessed value, or the default value if the event does not contain state for the control. + /// True if the event contains state for the given control; false otherwise. + /// The type of value to read. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")] public static unsafe bool ReadUnprocessedValueFromEvent(this InputControl control, InputEventPtr inputEvent, out TValue value) where TValue : struct @@ -279,6 +293,10 @@ public static unsafe bool ReadUnprocessedValueFromEvent(this InputContro } ////REVIEW: this has the opposite argument order of WriteValueFromObjectIntoState; fix! + /// Writes the given boxed value into the state for the given control within the given event. + /// The control whose state layout determines where to write the value. + /// The event to write the value into. + /// The boxed value to write. public static unsafe void WriteValueFromObjectIntoEvent(this InputControl control, InputEventPtr eventPtr, object value) { if (control == null) @@ -324,6 +342,11 @@ public static unsafe void WriteValueIntoState(this InputControl control, void* s } } + /// Writes the given value into the state buffer at the position described by the given control. + /// The control that determines the state layout to write into. + /// The value to write. + /// Pointer to the state buffer to write into. + /// The type of the value to write. public static unsafe void WriteValueIntoState(this InputControl control, TValue value, void* statePtr) where TValue : struct { @@ -337,6 +360,11 @@ public static unsafe void WriteValueIntoState(this InputControl control, controlOfType.WriteValueIntoState(value, statePtr); } + /// Writes the given typed value into the state buffer at the position described by the given typed control. + /// The control that determines the state layout to write into. + /// The value to write. + /// Pointer to the state buffer to write into. + /// The type of the value to write. public static unsafe void WriteValueIntoState(this InputControl control, TValue value, void* statePtr) where TValue : struct { @@ -351,6 +379,10 @@ public static unsafe void WriteValueIntoState(this InputControl control.WriteValueFromBufferIntoState(valuePtr, valueSize, statePtr); } + /// Reads the current value from the given typed control and writes it into the given state buffer. + /// The control to read the current value from and write into the state buffer. + /// Pointer to the state buffer to write into. + /// The type of the value to write. public static unsafe void WriteValueIntoState(this InputControl control, void* statePtr) where TValue : struct { @@ -361,11 +393,13 @@ public static unsafe void WriteValueIntoState(this InputControl } /// - /// + /// Write the value of the given control into the given state. /// - /// + /// The control to write the value for. + /// The state struct to write the value into. /// Value for to write into . - /// + /// The type of value to write. + /// The type of state struct to write into. /// is null. /// Control's value does not fit within the memory of . /// does not support writing. @@ -388,6 +422,11 @@ public static unsafe void WriteValueIntoState(this InputControl< control.WriteValueIntoState(value, statePtr); } + /// Writes the given value into the state for the given control within the given event. + /// The control whose state layout determines where to write the value. + /// The value to write. + /// The event to write the value into. + /// The type of the value to write. public static void WriteValueIntoEvent(this InputControl control, TValue value, InputEventPtr eventPtr) where TValue : struct { @@ -403,6 +442,11 @@ public static void WriteValueIntoEvent(this InputControl control, TValue controlOfType.WriteValueIntoEvent(value, eventPtr); } + /// Writes the given typed value into the state for the given typed control within the given event. + /// The control whose state layout determines where to write the value. + /// The value to write. + /// The event to write the value into. + /// The type of the value to write. public static unsafe void WriteValueIntoEvent(this InputControl control, TValue value, InputEventPtr eventPtr) where TValue : struct { @@ -523,6 +567,9 @@ public static unsafe bool CheckStateIsAtDefault(this InputControl control, void* return control.CompareState(statePtr, control.defaultStatePtr, maskPtr); } + /// Returns true if all state bits for the given control are at their default values, ignoring any noisy controls. + /// The control to check. + /// True if the control is at its default state, ignoring noise. public static unsafe bool CheckStateIsAtDefaultIgnoringNoise(this InputControl control) { if (control == null) @@ -559,6 +606,7 @@ public static unsafe bool CheckStateIsAtDefaultIgnoringNoise(this InputControl c /// /// Compare the control's current state to the state stored in . /// + /// The control whose state layout defines what to compare. /// State memory containing the control's . /// True if /// @@ -582,6 +630,7 @@ public static unsafe bool CompareStateIgnoringNoise(this InputControl control, v /// /// Compare the control's stored state in to . /// + /// The control whose state layout defines what to compare. /// Memory containing the control's . /// Memory containing the control's /// Optional mask. If supplied, it will be used to mask the comparison between @@ -619,6 +668,11 @@ public static unsafe bool CompareState(this InputControl control, void* firstSta control.m_StateBlock.bitOffset, control.m_StateBlock.sizeInBits, mask); } + /// Returns true if the state of the given control differs between the current state and the given state buffer. + /// The control whose state layout defines what to compare. + /// State memory to compare the control's current state against. + /// Optional noise mask to ignore certain state bits. + /// True if the state is equivalent in both memory buffers. public static unsafe bool CompareState(this InputControl control, void* statePtr, void* maskPtr = null) { if (control == null) @@ -885,6 +939,11 @@ internal static unsafe void AccumulateValueInEvent(this InputControl co control.WriteValueIntoEvent(oldDelta + newValue, newState); } + /// Recursively searches the given control's hierarchy and adds all controls of type matching the predicate to the list. + /// The root control to start the search from. + /// The list to add matching controls to. + /// A predicate to filter controls. Controls are only added if this returns true. + /// The type of control to search for. public static void FindControlsRecursive(this InputControl parent, IList controls, Func predicate) where TControl : InputControl { @@ -1304,6 +1363,8 @@ private bool CheckCurrent(uint numBits) return MemoryHelpers.MemCmpBitRegion(m_EventState, m_CurrentState, m_CurrentBitOffset, numBits, m_NoiseMask); } + /// Advances the enumerator to the next control that has changed state in the event. + /// True if a control with changed state was found; false if the end of the event was reached. public bool MoveNext() { if (!m_EventPtr.valid) @@ -1465,6 +1526,7 @@ public bool MoveNext() } } + /// Resets the enumerator to its initial state before the first control. public void Reset() { if (!m_EventPtr.valid) @@ -1543,11 +1605,13 @@ public void Reset() // call but that we'd add work to every DeltaStateEvent if we were to have the upfront comparison here. } + /// Releases any resources held by the enumerator. public void Dispose() { m_EventPtr = default; } + /// Returns the current control in the enumeration. public InputControl Current => m_CurrentControl; object IEnumerator.Current => Current; diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayout.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayout.cs index 7a5be95c37..aa7fe7679c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayout.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayout.cs @@ -61,8 +61,10 @@ public delegate string InputDeviceFindControlLayoutDelegate(ref InputDeviceDescr public class InputControlLayout { private static readonly InternedString s_DefaultVariant = new InternedString("Default"); + /// Name of the default variant applied when no variant is explicitly specified. public static InternedString DefaultVariant => s_DefaultVariant; + /// Character used to separate variants in a variant string. public const string VariantSeparator = ";"; /// @@ -100,7 +102,9 @@ public struct ControlItem /// public InternedString layout { get; internal set; } + /// The variant(s) this control item applies to. public InternedString variants { get; internal set; } + /// Name of another control whose state this control reads from. public string useStateFrom { get; internal set; } /// @@ -115,15 +119,24 @@ public struct ControlItem /// public string shortDisplayName { get; internal set; } + /// Usages assigned to this control. public ReadOnlyArray usages { get; internal set; } + /// Alternative names by which this control can be looked up. public ReadOnlyArray aliases { get; internal set; } + /// Parameters passed to the control's constructor. public ReadOnlyArray parameters { get; internal set; } + /// Processors to apply to the control's value. public ReadOnlyArray processors { get; internal set; } + /// Byte offset of this control's state within the device state. public uint offset { get; internal set; } + /// Bit offset within the byte at . public uint bit { get; internal set; } + /// Size of this control's state data in bits. public uint sizeInBits { get; internal set; } + /// FourCC format code of the state data. public FourCC format { get; internal set; } private Flags flags { get; set; } + /// If greater than zero, this control is an array of controls with this many elements. public int arraySize { get; internal set; } /// @@ -131,7 +144,9 @@ public struct ControlItem /// public PrimitiveValue defaultState { get; internal set; } + /// Minimum value this control can report. public PrimitiveValue minValue { get; internal set; } + /// Maximum value this control can report. public PrimitiveValue maxValue { get; internal set; } /// @@ -244,12 +259,14 @@ internal set } } + /// True if this control item represents an array of controls. public bool isArray => (arraySize != 0); /// /// For any property not set on this control layout, take the setting from . /// /// Control layout providing settings. + /// The merged control item. /// /// will not be touched. /// @@ -353,22 +370,31 @@ private enum Flags // Unique name of the layout. // NOTE: Case-insensitive. + /// The name of this layout. public InternedString name => m_Name; + /// A display-friendly name for this layout. public string displayName => m_DisplayName ?? m_Name; + /// The C# type that this layout maps to. public Type type => m_Type; + /// The variant(s) this layout applies to, or an empty string for the default variant. public InternedString variants => m_Variants; + /// The FourCC format code identifying the state struct this layout uses. public FourCC stateFormat => m_StateFormat; + /// The total size of the state struct in bytes. public int stateSizeInBytes => m_StateSizeInBytes; + /// Names of layouts this layout inherits controls and settings from. public IEnumerable baseLayouts => m_BaseLayouts; + /// Names of layout overrides that have been applied on top of this layout. public IEnumerable appliedOverrides => m_AppliedOverrides; + /// Usages that are commonly assigned to devices using this layout. public ReadOnlyArray commonUsages => new ReadOnlyArray(m_CommonUsages); /// @@ -378,10 +404,13 @@ private enum Flags public ReadOnlyArray controls => new ReadOnlyArray(m_Controls); ////FIXME: this should be a `bool?` + /// If true, the device is updated once before rendering in addition to the normal update cycle. public bool updateBeforeRender => m_UpdateBeforeRender ?? false; + /// True if this layout describes an . public bool isDeviceLayout => typeof(InputDevice).IsAssignableFrom(m_Type); + /// True if this layout describes an that is not a device. public bool isControlLayout => !isDeviceLayout; /// @@ -402,6 +431,7 @@ internal set } } + /// True if this layout is a generic type of device (e.g. Gamepad, Keyboard) rather than a specific product. public bool isGenericTypeOfDevice { get => (m_Flags & Flags.IsGenericTypeOfDevice) != 0; @@ -414,6 +444,7 @@ internal set } } + /// True if this layout should not appear in user-facing lists of device types. public bool hideInUI { get => (m_Flags & Flags.HideInUI) != 0; @@ -471,6 +502,7 @@ internal set } } + /// Returns the for the control with the given name. public ControlItem this[string path] { get @@ -492,6 +524,7 @@ public ControlItem this[string path] } } + /// Returns the for the control with the given interned name, or null if not found. public ControlItem? FindControl(InternedString path) { if (string.IsNullOrEmpty(path)) @@ -509,6 +542,7 @@ public ControlItem this[string path] return null; } + /// Returns the for the given name, expanding array controls, and outputs the element index. public ControlItem? FindControlIncludingArrayElements(string path, out int arrayIndex) { if (string.IsNullOrEmpty(path)) @@ -659,12 +693,14 @@ public struct ControlBuilder internal Builder builder; internal int index; + /// Sets the display name of the control and returns this builder. public ControlBuilder WithDisplayName(string displayName) { builder.m_Controls[index].displayName = displayName; return this; } + /// Sets the layout used for the control and returns this builder. public ControlBuilder WithLayout(string layout) { if (string.IsNullOrEmpty(layout)) @@ -674,53 +710,62 @@ public ControlBuilder WithLayout(string layout) return this; } + /// Sets the state format FourCC for the control and returns this builder. public ControlBuilder WithFormat(FourCC format) { builder.m_Controls[index].format = format; return this; } + /// Sets the state format from a four-character string and returns this builder. public ControlBuilder WithFormat(string format) { return WithFormat(new FourCC(format)); } + /// Sets the byte offset of the control within the device state and returns this builder. public ControlBuilder WithByteOffset(uint offset) { builder.m_Controls[index].offset = offset; return this; } + /// Sets the bit offset of the control within its byte and returns this builder. public ControlBuilder WithBitOffset(uint bit) { builder.m_Controls[index].bit = bit; return this; } + /// Marks the control as synthetic (not corresponding to a physical input) and returns this builder. public ControlBuilder IsSynthetic(bool value) { builder.m_Controls[index].isSynthetic = value; return this; } + /// Marks the control as noisy (may produce values even when not touched) and returns this builder. public ControlBuilder IsNoisy(bool value) { builder.m_Controls[index].isNoisy = value; return this; } + /// Controls whether the input system resets this control's value when the device loses focus and returns this builder. public ControlBuilder DontReset(bool value) { builder.m_Controls[index].dontReset = value; return this; } + /// Sets the size of the control's state data in bits and returns this builder. public ControlBuilder WithSizeInBits(uint sizeInBits) { builder.m_Controls[index].sizeInBits = sizeInBits; return this; } + /// Sets the minimum and maximum values this control can report and returns this builder. public ControlBuilder WithRange(float minValue, float maxValue) { builder.m_Controls[index].minValue = minValue; @@ -728,6 +773,7 @@ public ControlBuilder WithRange(float minValue, float maxValue) return this; } + /// Sets the usages for this control from interned strings and returns this builder. public ControlBuilder WithUsages(params InternedString[] usages) { if (usages == null || usages.Length == 0) @@ -743,17 +789,20 @@ public ControlBuilder WithUsages(params InternedString[] usages) return this; } + /// Sets the usages for this control from a sequence of strings and returns this builder. public ControlBuilder WithUsages(IEnumerable usages) { var usagesArray = usages.Select(x => new InternedString(x)).ToArray(); return WithUsages(usagesArray); } + /// Sets the usages for this control from string params and returns this builder. public ControlBuilder WithUsages(params string[] usages) { return WithUsages((IEnumerable)usages); } + /// Sets construction parameters for this control from a parameter string and returns this builder. public ControlBuilder WithParameters(string parameters) { if (string.IsNullOrEmpty(parameters)) @@ -763,6 +812,7 @@ public ControlBuilder WithParameters(string parameters) return this; } + /// Sets the processors to apply to this control's values from a processor string and returns this builder. public ControlBuilder WithProcessors(string processors) { if (string.IsNullOrEmpty(processors)) @@ -772,12 +822,14 @@ public ControlBuilder WithProcessors(string processors) return this; } + /// Sets the default state value for this control and returns this builder. public ControlBuilder WithDefaultState(PrimitiveValue value) { builder.m_Controls[index].defaultState = value; return this; } + /// Makes this control share state with the named control and returns this builder. public ControlBuilder UsingStateFrom(string path) { if (string.IsNullOrEmpty(path)) @@ -786,6 +838,7 @@ public ControlBuilder UsingStateFrom(string path) return this; } + /// Makes this control an array of controls with the given element count and returns this builder. public ControlBuilder AsArrayOfControlsWithSize(int arraySize) { builder.m_Controls[index].arraySize = arraySize; @@ -826,18 +879,21 @@ public ControlBuilder AddControl(string name) }; } + /// Sets the name of the layout being built and returns this builder. public Builder WithName(string name) { this.name = name; return this; } + /// Sets the display name of the layout being built and returns this builder. public Builder WithDisplayName(string displayName) { this.displayName = displayName; return this; } + /// Sets the C# type the layout maps to (generic type parameter) and returns this builder. public Builder WithType() where T : InputControl { @@ -845,29 +901,34 @@ public Builder WithType() return this; } + /// Sets the state format FourCC for the layout and returns this builder. public Builder WithFormat(FourCC format) { stateFormat = format; return this; } + /// Sets the state format from a four-character string and returns this builder. public Builder WithFormat(string format) { return WithFormat(new FourCC(format)); } + /// Sets the state size in bytes for the layout and returns this builder. public Builder WithSizeInBytes(int sizeInBytes) { stateSizeInBytes = sizeInBytes; return this; } + /// Makes the layout extend the given base layout and returns this builder. public Builder Extend(string baseLayoutName) { extendsLayout = baseLayoutName; return this; } + /// Builds and returns the from the current builder state. public InputControlLayout Build() { ControlItem[] controls = null; @@ -897,6 +958,7 @@ public InputControlLayout Build() // Uses reflection to construct a layout from the given type. // Can be used with both control classes and state structs. + /// Creates an from the given C# type. public static InputControlLayout FromType(string name, Type type) { var controlLayouts = new List(); @@ -954,6 +1016,7 @@ public static InputControlLayout FromType(string name, Type type) return layout; } + /// Serializes this layout to a JSON string. public string ToJson() { var layout = LayoutJson.FromLayout(this); @@ -961,6 +1024,7 @@ public string ToJson() } // Constructs a layout from the given JSON source. + /// Deserializes an from a JSON string. public static InputControlLayout FromJson(string json) { var layoutJson = JsonUtility.FromJson(json); @@ -2169,31 +2233,38 @@ public void AddMatcher(InternedString layout, InputDeviceMatcher matcher) // This collection is owned and managed by InputManager. internal static Collection s_Layouts; + /// Exception thrown when a layout referenced by name cannot be found in the layout registry. public class LayoutNotFoundException : Exception { + /// The name of the layout that could not be found. public string layout { get; } + /// Initializes a new instance with a default message. public LayoutNotFoundException() { } + /// Initializes a new instance for the given layout name and action that required it. public LayoutNotFoundException(string name, string message) : base(message) { layout = name; } + /// Initializes a new instance with the given message. public LayoutNotFoundException(string name) : base($"Cannot find control layout '{name}'") { layout = name; } + /// Initializes a new instance with the given message and inner exception. public LayoutNotFoundException(string message, Exception innerException) : base(message, innerException) { } + /// Initializes a new instance from serialization data. protected LayoutNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutAttribute.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutAttribute.cs index 70928594ab..3ff280c868 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutAttribute.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutAttribute.cs @@ -50,9 +50,11 @@ public sealed class InputControlLayoutAttribute : Attribute public string stateFormat { get; set; } ////TODO: rename this to just "usages"; "commonUsages" is such a weird name + /// Usages that devices using this layout commonly have. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "According to MSDN, this message can be ignored for attribute parameters, as there are no better alternatives.")] public string[] commonUsages { get; set; } + /// The variant(s) this layout applies to. public string variants { get; set; } /// @@ -70,6 +72,7 @@ public sealed class InputControlLayoutAttribute : Attribute internal bool? canRunInBackgroundInternal; + /// If true, input from devices using this layout is processed even when the application is in the background. public bool canRunInBackground { get => canRunInBackgroundInternal.Value; @@ -104,6 +107,7 @@ public bool updateBeforeRender /// public string displayName { get; set; } + /// A human-readable description of what this layout is for. public string description { get; set; } /// diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutChange.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutChange.cs index abef271c0e..432b2d7406 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutChange.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlLayoutChange.cs @@ -5,8 +5,11 @@ namespace UnityEngine.InputSystem /// public enum InputControlLayoutChange { + /// A new layout was added to the system. Added, + /// An existing layout was removed from the system. Removed, + /// An existing layout was replaced with a new version. Replaced } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlList.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlList.cs index 92f123ac2e..5aecc74999 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlList.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlList.cs @@ -365,16 +365,19 @@ public void RemoveAt(int index) ArrayHelpers.EraseAtWithCapacity(m_Indices, ref m_Count, index); } + /// Copies all controls in this list into the given array starting at the specified index. public void CopyTo(TControl[] array, int arrayIndex) { throw new NotImplementedException(); } + /// Returns the index of the first occurrence of the given control, or -1 if not found. public int IndexOf(TControl item) { return IndexOf(item, 0); } + /// Returns the index of the first occurrence of the given control within the given range, or -1 if not found. public int IndexOf(TControl item, int startIndex, int count = -1) { if (startIndex < 0) @@ -399,26 +402,31 @@ public int IndexOf(TControl item, int startIndex, int count = -1) return -1; } + /// Inserts the given control at the specified index. public void Insert(int index, TControl item) { throw new NotImplementedException(); } + /// Removes all controls from this list. public void Clear() { m_Count = 0; } + /// Returns true if the given control is in this list. public bool Contains(TControl item) { return IndexOf(item) != -1; } + /// Returns true if the given control appears within the specified range of this list. public bool Contains(TControl item, int startIndex, int count = -1) { return IndexOf(item, startIndex, count) != -1; } + /// Swaps the controls at the two given indices. public void SwapElements(int index1, int index2) { if (index1 < 0 || index1 >= m_Count) @@ -430,6 +438,7 @@ public void SwapElements(int index1, int index2) m_Indices.SwapElements(index1, index2); } + /// Sorts the controls in the given range using the given comparer. public void Sort(int startIndex, int count, TCompare comparer) where TCompare : IComparer { @@ -472,12 +481,14 @@ internal void AppendTo(ref TControl[] array, ref int count) ArrayHelpers.AppendWithCapacity(ref array, ref count, this[i]); } + /// Releases the native memory used by this list. public void Dispose() { if (m_Indices.IsCreated) m_Indices.Dispose(); } + /// Returns an enumerator that iterates over all controls in this list. public IEnumerator GetEnumerator() { return new Enumerator(this); @@ -488,6 +499,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// Returns a string listing all controls in this list. public override string ToString() { if (Count == 0) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlPath.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlPath.cs index 4e75a559bf..4fafb8a4a2 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlPath.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputControlPath.cs @@ -47,9 +47,12 @@ namespace UnityEngine.InputSystem /// public static class InputControlPath { + /// Wildcard string used in paths to match any single path component. public const string Wildcard = "*"; + /// Double wildcard string used in paths to match any number of path components recursively. public const string DoubleWildcard = "**"; + /// The path separator character used to separate path components. public const char Separator = '/'; // We consider / a reserved character in control names. So, when this character does creep @@ -65,6 +68,7 @@ internal static string CleanSlashes(this String pathComponent) return pathComponent.Replace(Separator, SeparatorReplacement); } + /// Combines the path of the given control with the given suffix to form a complete control path. public static string Combine(InputControl parent, string path) { if (parent == null) @@ -278,6 +282,7 @@ public static string ToHumanReadableString(string path, } } + /// Parses usage tags from the given path string and returns them as an array, or null if none are present. public static string[] TryGetDeviceUsages(string path) { if (path == null) @@ -336,6 +341,7 @@ public static string TryGetDeviceLayout(string path) // From the given control path, try to determine the control layout being used. // NOTE: Allocates! + /// Returns the layout name specified in the given path string, or null if none is specified. public static string TryGetControlLayout(string path) { if (path == null) @@ -533,11 +539,13 @@ private static bool StringMatches(Substring str, InternedString matchTo) return posInMatchTo == matchToLength && posInStr == strLength; // Check if we have consumed all input. Prevent prefix-only match. } + /// Attempts to find a control matching the given path starting from the given root; returns null if not found. public static InputControl TryFindControl(InputControl control, string path, int indexInPath = 0) { return TryFindControl(control, path, indexInPath); } + /// Finds all controls matching the given path starting from the given root and returns them as an array. public static InputControl[] TryFindControls(InputControl control, string path, int indexInPath = 0) { var matches = new InputControlList(Allocator.Temp); @@ -552,6 +560,7 @@ public static InputControl[] TryFindControls(InputControl control, string path, } } + /// Finds all controls matching the given path and adds them to the given list; returns the number added. public static int TryFindControls(InputControl control, string path, ref InputControlList matches, int indexInPath = 0) { return TryFindControls(control, path, indexInPath, ref matches); @@ -567,6 +576,7 @@ public static int TryFindControls(InputControl control, string path, ref InputCo /// 0, i.e. parsing starts at the first character in the path. /// The first (direct or indirect) child control of that matches /// . + /// The type of control to find. /// is null. /// /// Does not allocate. @@ -636,11 +646,13 @@ public static int TryFindControls(InputControl control, string path, i ////REVIEW: what's the difference between TryFindChild and TryFindControl?? + /// Attempts to find a direct or indirect child control matching the given name; returns null if not found. public static InputControl TryFindChild(InputControl control, string path, int indexInPath = 0) { return TryFindChild(control, path, indexInPath); } + /// Attempts to find a typed child control matching the given name; returns null if not found. public static TControl TryFindChild(InputControl control, string path, int indexInPath = 0) where TControl : InputControl { @@ -664,6 +676,7 @@ public static TControl TryFindChild(InputControl control, string path, ////REVIEW: probably would be good to have a Matches(string,string) version + /// Returns true if the given path pattern matches the given control. public static bool Matches(string expected, InputControl control) { if (string.IsNullOrEmpty(expected)) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/InputProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/InputProcessor.cs index c18b9571e7..b95120843a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/InputProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/InputProcessor.cs @@ -169,6 +169,7 @@ public abstract class InputProcessor : InputProcessor /// Processed input value. public abstract TValue Process(TValue value, InputControl control); + /// Processes the given boxed value and returns the processed result as a boxed object. public override object ProcessAsObject(object value, InputControl control) { if (value == null) @@ -184,6 +185,7 @@ public override object ProcessAsObject(object value, InputControl control) return Process(valueOfType, control); } + /// Processes the value in the given buffer in-place. public override unsafe void Process(void* buffer, int bufferSize, InputControl control) { if (buffer == null) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/IntegerControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/IntegerControl.cs index 6c1b303bd9..43c820f17a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/IntegerControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/IntegerControl.cs @@ -44,6 +44,7 @@ public override unsafe void WriteValueIntoState(int value, void* statePtr) } } + /// Returns the FourCC type code of the optimized data format for this integer control. protected override FourCC CalculateOptimizedControlDataType() { if (m_StateBlock.format == InputStateBlock.FormatInt && diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs index d788916fea..d944cc46c1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/KeyControl.cs @@ -59,6 +59,7 @@ public int scanCode } } /// + /// Refreshes the key name from the current keyboard layout. protected override void RefreshConfiguration() { // Wipe our last cached set of data (if any). diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs index a153a3f7f7..cdd644ddfd 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs @@ -27,11 +27,13 @@ public class StickDeadzoneProcessor : InputProcessor /// will be scaled to the range between min and max. /// public float min; + /// The upper edge of the deadzone; inputs above this magnitude are clamped to 1. public float max; private float minOrDefault => min == default ? InputSystem.settings.defaultDeadzoneMin : min; private float maxOrDefault => max == default ? InputSystem.settings.defaultDeadzoneMax : max; + /// Applies the stick deadzone to the given Vector2 value and returns the result. public override Vector2 Process(Vector2 value, InputControl control = null) { var magnitude = value.magnitude; @@ -57,6 +59,7 @@ private float GetDeadZoneAdjustedValue(float value) return Mathf.Sign(value) * ((absValue - min) / (max - min)); } + /// Returns a string representation of this processor and its parameters. public override string ToString() { return $"StickDeadzone(min={minOrDefault},max={maxOrDefault})"; diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/QuaternionControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/QuaternionControl.cs index 21081cf1b6..b4a74fbfaa 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/QuaternionControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/QuaternionControl.cs @@ -97,6 +97,7 @@ public override unsafe void WriteValueIntoState(Quaternion value, void* statePtr } } + /// Returns the FourCC type code of the optimized data format for this quaternion control. protected override FourCC CalculateOptimizedControlDataType() { if ( diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/StickControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/StickControl.cs index 2ecea7f7a5..d313eadeb1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/StickControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/StickControl.cs @@ -106,6 +106,7 @@ public class StickControl : Vector2Control [InputControl(useStateFrom = "x", processors = "axisDeadzone", parameters = "clamp=2,clampMin=0,clampMax=1", synthetic = true, displayName = "Right")] public ButtonControl right { get; set; } + /// Resolves child axis controls after the control hierarchy is built. protected override void FinishSetup() { base.FinishSetup(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/TouchPressControl.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/TouchPressControl.cs index 8837fd33f1..68ff74c63a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/TouchPressControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/TouchPressControl.cs @@ -44,6 +44,7 @@ public override unsafe float ReadUnprocessedValueFromState(void* statePtr) return Preprocess(value); } + /// Writes the given float pressure value into the state buffer. public override unsafe void WriteValueIntoState(float value, void* statePtr) { throw new NotSupportedException(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Vector2Control.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Vector2Control.cs index 995f034605..12f7b40268 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Vector2Control.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Vector2Control.cs @@ -89,6 +89,7 @@ public override unsafe float EvaluateMagnitude(void* statePtr) return ReadValueFromStateWithCaching(statePtr).magnitude; } + /// Returns the FourCC type code of the optimized data format for this Vector2 control. protected override FourCC CalculateOptimizedControlDataType() { if ( diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Vector3Control.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Vector3Control.cs index 0e55a2c62a..a743f3929d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Vector3Control.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Vector3Control.cs @@ -9,18 +9,23 @@ namespace UnityEngine.InputSystem.Controls /// public class Vector3Control : InputControl { + /// The X component of this Vector3 control. [InputControl(offset = 0, displayName = "X")] public AxisControl x { get; set; } + /// The Y component of this Vector3 control. [InputControl(offset = 4, displayName = "Y")] public AxisControl y { get; set; } + /// The Z component of this Vector3 control. [InputControl(offset = 8, displayName = "Z")] public AxisControl z { get; set; } + /// Initializes a new Vector3Control. public Vector3Control() { m_StateBlock.format = InputStateBlock.FormatVector3; } + /// Resolves child axis controls after the control hierarchy is built. protected override void FinishSetup() { x = GetChildControl("x"); @@ -30,6 +35,7 @@ protected override void FinishSetup() base.FinishSetup(); } + /// Reads the raw, unprocessed Vector3 value from the given state buffer. public override unsafe Vector3 ReadUnprocessedValueFromState(void* statePtr) { switch (m_OptimizedControlDataType) @@ -44,6 +50,7 @@ public override unsafe Vector3 ReadUnprocessedValueFromState(void* statePtr) } } + /// Writes the given Vector3 value into the given state buffer. public override unsafe void WriteValueIntoState(Vector3 value, void* statePtr) { switch (m_OptimizedControlDataType) @@ -59,12 +66,14 @@ public override unsafe void WriteValueIntoState(Vector3 value, void* statePtr) } } + /// Returns the magnitude of the Vector3 value in the given state buffer. public override unsafe float EvaluateMagnitude(void* statePtr) { ////REVIEW: this can go beyond 1; that okay? return ReadValueFromStateWithCaching(statePtr).magnitude; } + /// Returns the FourCC type code for the optimized state format of this control. protected override FourCC CalculateOptimizedControlDataType() { if ( diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/DisableDeviceCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/DisableDeviceCommand.cs index e0d0a4f7c2..6a5d387bda 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/DisableDeviceCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/DisableDeviceCommand.cs @@ -9,18 +9,22 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public struct DisableDeviceCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('D', 'S', 'B', 'L'); } } internal const int kSize = InputDeviceCommand.kBaseCommandSize; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Static FourCC type code used to identify this command. public FourCC typeStatic { get { return Type; } } + /// Creates a disable device command. public static DisableDeviceCommand Create() { return new DisableDeviceCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableDeviceCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableDeviceCommand.cs index 3689a6e377..ff2183ed4b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableDeviceCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableDeviceCommand.cs @@ -9,18 +9,22 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public struct EnableDeviceCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('E', 'N', 'B', 'L'); } } internal const int kSize = InputDeviceCommand.kBaseCommandSize; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Static FourCC type code used to identify this command. public FourCC typeStatic { get { return Type; } } + /// Creates an enable device command. public static EnableDeviceCommand Create() { return new EnableDeviceCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableIMECompositionCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableIMECompositionCommand.cs index fada2da682..bd34748af1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableIMECompositionCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/EnableIMECompositionCommand.cs @@ -9,10 +9,12 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize + sizeof(byte))] public unsafe struct EnableIMECompositionCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('I', 'M', 'E', 'M'); } } internal const int kSize = InputDeviceCommand.kBaseCommandSize + +sizeof(uint); + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; @@ -27,11 +29,13 @@ public bool imeEnabled [FieldOffset(InputDeviceCommand.kBaseCommandSize)] byte m_ImeEnabled; + /// Static FourCC type code used to identify this command. public FourCC typeStatic { get { return Type; } } + /// Creates a command to enable or disable IME composition input. public static EnableIMECompositionCommand Create(bool enabled) { return new EnableIMECompositionCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InitiateUserAccountPairingCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InitiateUserAccountPairingCommand.cs index b4ad1358ca..6e2fa11cb7 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InitiateUserAccountPairingCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InitiateUserAccountPairingCommand.cs @@ -15,13 +15,16 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public struct InitiateUserAccountPairingCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('P', 'A', 'I', 'R'); } } internal const int kSize = InputDeviceCommand.kBaseCommandSize; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Possible results of an account pairing initiation command. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Justification = "Enum values mandated by native code")] public enum Result { @@ -42,11 +45,13 @@ public enum Result ErrorAlreadyInProgress = -2, } + /// Static FourCC type code used to identify this command. public FourCC typeStatic { get { return Type; } } + /// Creates a command to initiate platform account pairing for the device. public static InitiateUserAccountPairingCommand Create() { return new InitiateUserAccountPairingCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InputDeviceCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InputDeviceCommand.cs index 3940da1f9c..424a6ff7a5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InputDeviceCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/InputDeviceCommand.cs @@ -9,12 +9,16 @@ namespace UnityEngine.InputSystem.LowLevel /// /// Delegate used by . /// + /// The device to execute the command on. + /// Pointer to the command to execute. + /// A non-negative value on success, or a negative value on failure. public unsafe delegate long? InputDeviceCommandDelegate(InputDevice device, InputDeviceCommand* command); /// /// Delegate for executing s inside . /// /// Command to execute. + /// A non-negative value on success, or a negative value on failure. /// /// public delegate long InputDeviceExecuteCommandDelegate(ref InputDeviceCommand command); @@ -37,6 +41,7 @@ public struct InputDeviceCommand : IInputDeviceCommandInfo { ////TODO: Remove kBaseCommandSize internal const int kBaseCommandSize = 8; + /// The size in bytes of the base header. public const int BaseCommandSize = 8; /// @@ -47,13 +52,18 @@ public struct InputDeviceCommand : IInputDeviceCommandInfo /// public const long GenericFailure = -1; + /// Return value indicating a generic success result. public const long GenericSuccess = 1; + /// The FourCC type identifier of this command. [FieldOffset(0)] public FourCC type; + /// The total size of this command in bytes. [FieldOffset(4)] public int sizeInBytes; + /// The size in bytes of the command payload beyond the base header. public int payloadSizeInBytes => sizeInBytes - kBaseCommandSize; + /// Pointer to the first byte of the command payload. public unsafe void* payloadPtr { get @@ -65,12 +75,14 @@ public unsafe void* payloadPtr } } + /// Initializes a command with the given type code and total size. public InputDeviceCommand(FourCC type, int sizeInBytes = kBaseCommandSize) { this.type = type; this.sizeInBytes = sizeInBytes; } + /// Allocates a native buffer for a command of the given type and payload size. public static unsafe NativeArray AllocateNative(FourCC type, int payloadSize) { var sizeInBytes = payloadSize + kBaseCommandSize; @@ -83,6 +95,7 @@ public static unsafe NativeArray AllocateNative(FourCC type, int payloadSi return buffer; } + /// Static FourCC type code used to identify this command type. public FourCC typeStatic { get { return new FourCC(); } diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryCanRunInBackground.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryCanRunInBackground.cs index 0384a987b7..822d6075a6 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryCanRunInBackground.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryCanRunInBackground.cs @@ -10,18 +10,23 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize + sizeof(bool))] public struct QueryCanRunInBackground : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type => new FourCC('Q', 'R', 'I', 'B'); internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(bool); + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Output field set to true if the device can generate input while the app runs in the background. [FieldOffset(InputDeviceCommand.kBaseCommandSize)] public bool canRunInBackground; + /// Static FourCC type code used to identify this command. public FourCC typeStatic => Type; + /// Creates a query can-run-in-background command. public static QueryCanRunInBackground Create() { return new QueryCanRunInBackground diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryDimensionsCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryDimensionsCommand.cs index 8920d6a4fd..a612e02f76 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryDimensionsCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryDimensionsCommand.cs @@ -12,21 +12,26 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public struct QueryDimensionsCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('D', 'I', 'M', 'S'); } } internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(float) * 2; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Output field filled in with the device dimensions after the command executes. [FieldOffset(InputDeviceCommand.kBaseCommandSize)] public Vector2 outDimensions; + /// Static FourCC type code used to identify this command. public FourCC typeStatic { get { return Type; } } + /// Creates a query dimensions command. public static QueryDimensionsCommand Create() { return new QueryDimensionsCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryEnabledStateCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryEnabledStateCommand.cs index a410d2f3a8..8080eaeb93 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryEnabledStateCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryEnabledStateCommand.cs @@ -9,18 +9,23 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public struct QueryEnabledStateCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type => new FourCC('Q', 'E', 'N', 'B'); internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(bool); + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Output field indicating whether the device is enabled after the command executes. [FieldOffset(InputDeviceCommand.kBaseCommandSize)] public bool isEnabled; + /// Static FourCC type code used to identify this command. public FourCC typeStatic => Type; + /// Creates a query enabled state command. public static QueryEnabledStateCommand Create() { return new QueryEnabledStateCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyNameCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyNameCommand.cs index 87865c7d14..7e8fa347b9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyNameCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyNameCommand.cs @@ -10,20 +10,25 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public unsafe struct QueryKeyNameCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type => new FourCC('K', 'Y', 'C', 'F'); internal const int kMaxNameLength = 256; internal const int kSize = InputDeviceCommand.kBaseCommandSize + kMaxNameLength + 4; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// The scan code or key code to query the name for. [FieldOffset(InputDeviceCommand.kBaseCommandSize)] public int scanOrKeyCode; + /// Output buffer filled in with the key name after the command executes. [FieldOffset(InputDeviceCommand.kBaseCommandSize + 4)] public fixed byte nameBuffer[kMaxNameLength]; + /// Reads the key name from the output buffer as a string. public string ReadKeyName() { fixed(QueryKeyNameCommand * thisPtr = &this) @@ -32,8 +37,10 @@ public string ReadKeyName() } } + /// Static FourCC type code used to identify this command. public FourCC typeStatic => Type; + /// Creates a query key name command for the given key. public static QueryKeyNameCommand Create(Key key) { return new QueryKeyNameCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyboardLayoutCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyboardLayoutCommand.cs index 129cc5f7aa..c6e11d392a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyboardLayoutCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryKeyboardLayoutCommand.cs @@ -10,13 +10,16 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize + kMaxNameLength)] public unsafe struct QueryKeyboardLayoutCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('K', 'B', 'L', 'T'); } } internal const int kMaxNameLength = 256; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Output buffer filled in with the keyboard layout name after the command executes. [FieldOffset(InputDeviceCommand.kBaseCommandSize)] public fixed byte nameBuffer[kMaxNameLength]; @@ -40,8 +43,10 @@ public void WriteLayoutName(string name) StringHelpers.WriteStringToBuffer(name, new IntPtr(thisPtr->nameBuffer), kMaxNameLength); } + /// Static FourCC type code used to identify this command. public FourCC typeStatic => Type; + /// Creates a query keyboard layout command. public static QueryKeyboardLayoutCommand Create() { return new QueryKeyboardLayoutCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryPairedUserAccountCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryPairedUserAccountCommand.cs index a67d98b1a1..cae950c87c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryPairedUserAccountCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/QueryPairedUserAccountCommand.cs @@ -16,6 +16,7 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public unsafe struct QueryPairedUserAccountCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type => new FourCC('P', 'A', 'C', 'C'); internal const int kMaxNameLength = 256; @@ -24,6 +25,7 @@ public unsafe struct QueryPairedUserAccountCommand : IInputDeviceCommandInfo ////REVIEW: is this too heavy to allocate on the stack? internal const int kSize = InputDeviceCommand.kBaseCommandSize + 8 + kMaxNameLength * 2 + kMaxIdLength * 2; + /// Possible results of a paired user account query. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Justification = "`Result` matches other command result names")] [Flags] public enum Result : long @@ -52,6 +54,7 @@ public enum Result : long UserAccountSelectionCanceled = 1 << 4, } + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; @@ -130,8 +133,10 @@ public string name } } + /// Static FourCC type code used to identify this command. public FourCC typeStatic => Type; + /// Creates a query paired user account command. public static QueryPairedUserAccountCommand Create() { return new QueryPairedUserAccountCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestResetCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestResetCommand.cs index 7f0fefb102..0301018d02 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestResetCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestResetCommand.cs @@ -13,15 +13,19 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize)] public struct RequestResetCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type => new FourCC('R', 'S', 'E', 'T'); internal const int kSize = InputDeviceCommand.kBaseCommandSize; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Static FourCC type code used to identify this command. public FourCC typeStatic => Type; + /// Creates a request reset command. public static RequestResetCommand Create() { return new RequestResetCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestSyncCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestSyncCommand.cs index b77e0a9687..c02cd88e79 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestSyncCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/RequestSyncCommand.cs @@ -13,15 +13,19 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize)] public struct RequestSyncCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type => new FourCC('S', 'Y', 'N', 'C'); internal const int kSize = InputDeviceCommand.kBaseCommandSize; + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// Static FourCC type code used to identify this command. public FourCC typeStatic => Type; + /// Creates a request sync command. public static RequestSyncCommand Create() { return new RequestSyncCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetIMECursorPositionCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetIMECursorPositionCommand.cs index 173288c28a..9cfd32f2f0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetIMECursorPositionCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetIMECursorPositionCommand.cs @@ -10,13 +10,16 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public unsafe struct SetIMECursorPositionCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('I', 'M', 'E', 'P'); } } internal const int kSize = InputDeviceCommand.kBaseCommandSize + (sizeof(float) * 2); + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// The screen position for the IME composition window. public Vector2 position { get { return m_Position; } @@ -25,11 +28,13 @@ public Vector2 position [FieldOffset(InputDeviceCommand.kBaseCommandSize)] Vector2 m_Position; + /// Static FourCC type code used to identify this command. public FourCC typeStatic { get { return Type; } } + /// Creates a command to set the IME cursor position to the given screen coordinate. public static SetIMECursorPositionCommand Create(Vector2 cursorPosition) { return new SetIMECursorPositionCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetSamplingFrequencyCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetSamplingFrequencyCommand.cs index c7a3eb0eaa..790efd6fac 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetSamplingFrequencyCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Commands/SetSamplingFrequencyCommand.cs @@ -12,21 +12,26 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = kSize)] public struct SetSamplingFrequencyCommand : IInputDeviceCommandInfo { + /// The FourCC type identifier for this command. public static FourCC Type { get { return new FourCC('S', 'S', 'P', 'L'); } } internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(float); + /// The base header. [FieldOffset(0)] public InputDeviceCommand baseCommand; + /// The desired sampling frequency in Hz. [FieldOffset(InputDeviceCommand.kBaseCommandSize)] public float frequency; + /// Static FourCC type code used to identify this command. public FourCC typeStatic { get { return Type; } } + /// Creates a command to set the device's sampling frequency. public static SetSamplingFrequencyCommand Create(float frequency) { return new SetSamplingFrequencyCommand diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Gamepad.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Gamepad.cs index 3841c4d723..601bca06a4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Gamepad.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Gamepad.cs @@ -79,6 +79,7 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = 28)] public struct GamepadState : IInputStateTypeInfo { + /// The FourCC format code identifying this state struct. public static FourCC Format => new FourCC('G', 'P', 'A', 'D'); // On Sony consoles, we use the platform defaults as the gamepad-wide short default names. diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/IInputUpdateCallbackReceiver.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/IInputUpdateCallbackReceiver.cs index b48c9c6c65..c5a5843dea 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/IInputUpdateCallbackReceiver.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/IInputUpdateCallbackReceiver.cs @@ -10,6 +10,7 @@ namespace UnityEngine.InputSystem.LowLevel /// public interface IInputUpdateCallbackReceiver { + /// Called once per input update to allow the implementer to push state. void OnUpdate(); } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index a86f838357..15b459fd4e 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -365,6 +365,7 @@ internal bool canDeviceRunInBackground /// public double lastUpdateTime => m_LastUpdateTimeInternal - InputRuntime.s_CurrentTimeOffsetToRealtimeSinceStartup; + /// True if the device received an input update during the current frame. public bool wasUpdatedThisFrame => m_CurrentUpdateStepCount == InputUpdate.s_UpdateStepCount; /// @@ -600,6 +601,7 @@ protected virtual void OnConfigurationChanged() /// DeviceIoControl on Windows and ioctl /// on UNIX-like systems. /// + /// The type of the command to execute. public unsafe long ExecuteCommand(ref TCommand command) where TCommand : struct, IInputDeviceCommandInfo { @@ -627,6 +629,7 @@ public unsafe long ExecuteCommand(ref TCommand command) return ExecuteCommand((InputDeviceCommand*)UnsafeUtility.AddressOf(ref command)); } + /// Executes the given device command and returns the result code. protected virtual unsafe long ExecuteCommand(InputDeviceCommand* commandPtr) { return InputRuntime.s_Instance.DeviceCommand(deviceId, commandPtr); diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs index ce890f4f21..8b78ca491c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs @@ -49,6 +49,7 @@ public unsafe struct KeyboardState : IInputStateTypeInfo private const int kSizeInBits = Keyboard.ExtendedKeyCount; internal const int kSizeInBytes = (kSizeInBits + 7) / 8; + /// Bit array storing the pressed state of all keyboard keys. [InputControl(name = "anyKey", displayName = "Any Key", layout = "AnyKey", bit = 1, sizeInBits = kSizeInBits, synthetic = true)] [InputControl(name = "escape", displayName = "Escape", layout = "Key", usages = new[] {"Back", "Cancel"}, bit = (int)Key.Escape)] [InputControl(name = "space", displayName = "Space", layout = "Key", bit = (int)Key.Space)] @@ -219,6 +220,7 @@ public KeyboardState(bool IMESelected, params Key[] pressedKeys) } } + /// Sets the pressed state of the given key. public void Set(Key key, bool state) { fixed(byte* keysPtr = keys) @@ -233,16 +235,19 @@ internal bool Get(Key key) } } + /// Marks the given key as pressed. public void Press(Key key) { Set(key, true); } + /// Marks the given key as released. public void Release(Key key) { Set(key, false); } + /// The FourCC format code identifying this state struct. public FourCC format => Format; } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs index 2d4ecb5eb9..6922557ac9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs @@ -52,15 +52,25 @@ public sealed class InputRemoting : IObservable, IObserve /// public enum MessageType { + /// A new connection has been established with a remote sender. Connect, + /// An existing connection to a remote sender has been closed. Disconnect, + /// The remote is sending a new device layout definition. NewLayout, + /// The remote is informing of a newly added device. NewDevice, + /// The remote is sending a batch of input events. NewEvents, + /// The remote is informing that a device has been removed. RemoveDevice, + /// The remote is informing that a layout has been removed. RemoveLayout, // Not used ATM. + /// The remote is informing of a usage change on a device. ChangeUsages, + /// The remote is requesting that the local side start sending input data. StartSending, + /// The remote is requesting that the local side stop sending input data. StopSending, } @@ -74,10 +84,13 @@ public struct Message /// going out, numeric ID of the targeted receiver of the message. /// public int participantId; + /// The type of message being sent. public MessageType type; + /// The raw byte payload of the message. public byte[] data; } + /// True if this remoting instance is currently sending input data to a remote recipient. public bool sending { get => (m_Flags & Flags.Sending) == Flags.Sending; @@ -124,6 +137,7 @@ public void StartSending() SendInitialMessages(); } + /// Stops sending input data to the remote recipient. public void StopSending() { if (!sending) @@ -178,6 +192,7 @@ void IObserver.OnCompleted() { } + /// Subscribes the given observer to receive messages from the remote input sender. public IDisposable Subscribe(IObserver observer) { if (observer == null) @@ -430,6 +445,7 @@ public static void Process(InputRemoting receiver) } } + /// Removes all remote devices that were added from the connection with the given sender ID. public void RemoveRemoteDevices(int participantId) { var senderIndex = FindOrCreateSenderRecord(participantId); diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Sensor.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Sensor.cs index c4cd9c952d..152eb4eece 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Sensor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Sensor.cs @@ -158,6 +158,7 @@ public float samplingFrequency [InputControlLayout(stateType = typeof(AccelerometerState))] public class Accelerometer : Sensor { + /// Control reading the current acceleration vector in m/s². public Vector3Control acceleration { get; protected set; } /// @@ -198,6 +199,7 @@ protected override void FinishSetup() [InputControlLayout(stateType = typeof(GyroscopeState))] public class Gyroscope : Sensor { + /// Control reading the current angular velocity in rad/s. public Vector3Control angularVelocity { get; protected set; } /// @@ -239,6 +241,7 @@ protected override void FinishSetup() [InputControlLayout(stateType = typeof(GravityState), displayName = "Gravity")] public class GravitySensor : Sensor { + /// Control reading the current gravity vector in m/s². public Vector3Control gravity { get; protected set; } /// @@ -281,6 +284,7 @@ protected override void OnRemoved() [InputControlLayout(stateType = typeof(AttitudeState), displayName = "Attitude")] public class AttitudeSensor : Sensor { + /// Control reading the current device attitude as a quaternion. public QuaternionControl attitude { get; protected set; } /// @@ -323,6 +327,7 @@ protected override void FinishSetup() [InputControlLayout(stateType = typeof(LinearAccelerationState), displayName = "Linear Acceleration")] public class LinearAccelerationSensor : Sensor { + /// Control reading the linear acceleration (without gravity) in m/s². public Vector3Control acceleration { get; protected set; } /// diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs index 7a82e6a177..a8d8dd4b94 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs @@ -134,6 +134,7 @@ public struct TouchState : IInputStateTypeInfo [FieldOffset(32)] public byte phaseId; + /// Number of consecutive taps detected for this touch. [InputControl(name = "tapCount", displayName = "Tap Count", layout = "Integer")] [FieldOffset(33)] public byte tapCount; @@ -145,6 +146,7 @@ public struct TouchState : IInputStateTypeInfo [FieldOffset(34)] public byte displayIndex; + /// Flags providing additional information about this touch. [InputControl(name = "indirectTouch", displayName = "Indirect Touch?", layout = "Button", bit = 0, synthetic = true)] [InputControl(name = "tap", displayName = "Tap", layout = "Button", bit = 4)] [FieldOffset(35)] @@ -196,8 +198,10 @@ public TouchPhase phase set => phaseId = (byte)value; } + /// True if this touch has ended or been canceled. public bool isNoneEndedOrCanceled => phase == TouchPhase.None || phase == TouchPhase.Ended || phase == TouchPhase.Canceled; + /// True if this touch is currently active (began or moved). public bool isInProgress => phase == TouchPhase.Began || phase == TouchPhase.Moved || phase == TouchPhase.Stationary; @@ -232,6 +236,7 @@ internal bool isOrphanedPrimaryTouch } } + /// True if this is an indirect touch (e.g. from a trackpad rather than a direct touchscreen). public bool isIndirectTouch { get => (flags & (byte)TouchFlags.IndirectTouch) != 0; @@ -244,6 +249,7 @@ public bool isIndirectTouch } } + /// True if this touch was recognized as a tap. public bool isTap { get => isTapPress; @@ -507,6 +513,7 @@ public class Touchscreen : Pointer, IInputStateCallbackReceiver, IEventMerger, I static readonly ProfilerMarker k_TouchscreenUpdateMarker = new ProfilerMarker("Touchscreen.OnNextUpdate"); static readonly ProfilerMarker k_TouchAllocateMarker = new ProfilerMarker("TouchAllocate"); + /// The array of touch controls, one per concurrent touch slot. protected TouchControl[] touchControlArray { get => touches.m_Array; @@ -598,6 +605,7 @@ protected override void FinishSetup() // not only handle this scenario but also give a generally more flexible and useful touch API // than writing code directly against Touchscreen. + /// Called before the next input update to reset per-frame touch state. protected new unsafe void OnNextUpdate() { k_TouchscreenUpdateMarker.Begin(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs index 1e73381881..bdd9aed9f9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs @@ -85,6 +85,7 @@ public class TrackedDevice : InputDevice [InputControl(noisy = true, dontReset = true)] public QuaternionControl deviceRotation { get; protected set; } + /// Resolves child controls after the control hierarchy is built. protected override void FinishSetup() { base.FinishSetup(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/DeltaStateEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/DeltaStateEvent.cs index 7aa4f90727..3caa10f29c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/DeltaStateEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/DeltaStateEvent.cs @@ -16,22 +16,28 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Pack = 1, Size = InputEvent.kBaseEventSize + 9)] public unsafe struct DeltaStateEvent : IInputEventTypeInfo { + /// The FourCC type identifier for delta state events. public const int Type = 0x444C5441; // 'DLTA' + /// The base header. [FieldOffset(0)] public InputEvent baseEvent; + /// The FourCC format code of the state data in this event. [FieldOffset(InputEvent.kBaseEventSize)] public FourCC stateFormat; + /// The byte offset within the device state that this delta applies to. [FieldOffset(InputEvent.kBaseEventSize + 4)] public uint stateOffset; [FieldOffset(InputEvent.kBaseEventSize + 8)] internal fixed byte stateData[1]; // Variable-sized. + /// The size in bytes of the delta state payload. public uint deltaStateSizeInBytes => baseEvent.sizeInBytes - (InputEvent.kBaseEventSize + 8); + /// Pointer to the first byte of the delta state data. public void* deltaState { get @@ -43,8 +49,10 @@ public void* deltaState } } + /// Static FourCC type code used to identify this event type. public FourCC typeStatic => Type; + /// Returns an pointing to this event. public InputEventPtr ToEventPtr() { fixed(DeltaStateEvent * ptr = &this) @@ -53,6 +61,7 @@ public InputEventPtr ToEventPtr() } } + /// Casts the given event pointer to a pointer. public static DeltaStateEvent* From(InputEventPtr ptr) { if (!ptr.valid) @@ -68,6 +77,7 @@ public InputEventPtr ToEventPtr() return (DeltaStateEvent*)ptr.data; } + /// Allocates and initializes a delta state event for the given control. public static NativeArray From(InputControl control, out InputEventPtr eventPtr, Allocator allocator = Allocator.Temp) { if (control == null) diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/DeviceConfigurationEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/DeviceConfigurationEvent.cs index 9f40c612a0..5a2b8d9009 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/DeviceConfigurationEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/DeviceConfigurationEvent.cs @@ -13,15 +13,19 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputEvent.kBaseEventSize)] public struct DeviceConfigurationEvent : IInputEventTypeInfo { + /// The FourCC type identifier for device configuration events. public const int Type = 0x44434647; + /// The base header. [FieldOffset(0)] public InputEvent baseEvent; ////REVIEW: have some kind of payload that allows indicating what changed in the config? + /// Static FourCC type code used to identify this event type. public FourCC typeStatic => Type; + /// Returns an pointing to this event. public unsafe InputEventPtr ToEventPtr() { fixed(DeviceConfigurationEvent * ptr = &this) @@ -30,6 +34,7 @@ public unsafe InputEventPtr ToEventPtr() } } + /// Creates a device configuration event for the given device ID and timestamp. public static DeviceConfigurationEvent Create(int deviceId, double time) { var inputEvent = new DeviceConfigurationEvent(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/DeviceRemoveEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/DeviceRemoveEvent.cs index 408b7c0e8b..fbe77f4502 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/DeviceRemoveEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/DeviceRemoveEvent.cs @@ -13,6 +13,7 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputEvent.kBaseEventSize)] public struct DeviceRemoveEvent : IInputEventTypeInfo { + /// The FourCC type identifier for device remove events. public const int Type = 0x4452454D; /// @@ -21,8 +22,10 @@ public struct DeviceRemoveEvent : IInputEventTypeInfo [FieldOffset(0)] public InputEvent baseEvent; + /// Static FourCC type code used to identify this event type. public FourCC typeStatic => Type; + /// Returns an pointing to this event. public unsafe InputEventPtr ToEventPtr() { fixed(DeviceRemoveEvent * ptr = &this) @@ -31,6 +34,7 @@ public unsafe InputEventPtr ToEventPtr() } } + /// Creates a device remove event for the given device ID and timestamp. public static DeviceRemoveEvent Create(int deviceId, double time = -1) { var inputEvent = diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/DeviceResetEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/DeviceResetEvent.cs index 027be37081..4a7e692a58 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/DeviceResetEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/DeviceResetEvent.cs @@ -10,6 +10,7 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputEvent.kBaseEventSize)] public struct DeviceResetEvent : IInputEventTypeInfo { + /// The FourCC type identifier for device reset events. public const int Type = 0x44525354; // DRST /// @@ -24,8 +25,10 @@ public struct DeviceResetEvent : IInputEventTypeInfo [FieldOffset(InputDeviceCommand.kBaseCommandSize)] public bool hardReset; + /// Static FourCC type code used to identify this event type. public FourCC typeStatic => Type; + /// Creates a device reset event for the given device ID, full-reset flag, and timestamp. public static DeviceResetEvent Create(int deviceId, bool hardReset = false, double time = -1) { var inputEvent = diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/IInputEventTypeInfo.cs b/Packages/com.unity.inputsystem/InputSystem/Events/IInputEventTypeInfo.cs index 17571ba3d6..de25f840e7 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/IInputEventTypeInfo.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/IInputEventTypeInfo.cs @@ -10,6 +10,7 @@ namespace UnityEngine.InputSystem.LowLevel /// public interface IInputEventTypeInfo { + /// The static FourCC type code for events of this type. FourCC typeStatic { get; } } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/IMECompositionEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/IMECompositionEvent.cs index a9c886269f..b7a238981c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/IMECompositionEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/IMECompositionEvent.cs @@ -15,16 +15,21 @@ public struct IMECompositionEvent : IInputEventTypeInfo { // These needs to match the native ImeCompositionStringInputEventData settings internal const int kIMECharBufferSize = 64; + /// The FourCC type identifier for IME composition events. public const int Type = 0x494D4553; + /// The base header. [FieldOffset(0)] public InputEvent baseEvent; + /// The current IME composition string. [FieldOffset(InputEvent.kBaseEventSize)] public IMECompositionString compositionString; + /// Static FourCC type code used to identify this event type. public FourCC typeStatic => Type; + /// Creates an IME composition event for the given device ID, composition string, and timestamp. public static IMECompositionEvent Create(int deviceId, string compositionString, double time) { var inputEvent = new IMECompositionEvent(); @@ -89,8 +94,10 @@ public void Dispose() object IEnumerator.Current => Current; } + /// The number of characters in the composition string. public int Count => size; + /// Returns the character at the given index. public char this[int index] { get @@ -111,6 +118,7 @@ public char this[int index] [FieldOffset(sizeof(int))] fixed char buffer[IMECompositionEvent.kIMECharBufferSize]; + /// Initializes the composition string from the given plain string. public IMECompositionString(string characters) { if (string.IsNullOrEmpty(characters)) @@ -125,6 +133,7 @@ public IMECompositionString(string characters) buffer[i] = characters[i]; } + /// Returns the composition string as a plain C# string. public override string ToString() { fixed(char* ptr = buffer) @@ -133,6 +142,7 @@ public override string ToString() } } + /// Returns an enumerator over the characters in the composition string. public IEnumerator GetEnumerator() { return new Enumerator(this); diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs index 7dfe7f045d..882d0ebc74 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs @@ -190,6 +190,7 @@ internal double internalTime } ////FIXME: this API isn't consistent; time seems to be internalTime whereas time property is external time + /// Initializes a new event with the given type, size, device ID, and timestamp. public InputEvent(FourCC type, int sizeInBytes, int deviceId, double time = -1) { if (time < 0) @@ -207,6 +208,7 @@ public InputEvent(FourCC type, int sizeInBytes, int deviceId, double time = -1) // NOTE: The native system assigns IDs when events are queued so if our handled flag // will implicitly get overwritten. Having events go back to unhandled state // when they go on the queue makes sense in itself, though, so this is fine. + /// True if this event has been marked as handled and should be skipped by subsequent processors. public bool handled { get => (m_Event.eventId & kHandledMask) == kHandledMask; @@ -219,6 +221,7 @@ public bool handled } } + /// Returns a string representation of this event. public override string ToString() { return $"id={eventId} type={type} device={deviceId} size={sizeInBytes} time={time}"; @@ -264,6 +267,7 @@ public override string ToString() return nextPtr; } + /// Returns true if both event pointers point to the same event data. public static unsafe bool Equals(InputEvent* first, InputEvent* second) { if (first == second) diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/InputEventBuffer.cs b/Packages/com.unity.inputsystem/InputSystem/Events/InputEventBuffer.cs index 872b4e93bb..9f35a8aee3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/InputEventBuffer.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/InputEventBuffer.cs @@ -24,6 +24,7 @@ namespace UnityEngine.InputSystem.LowLevel /// public unsafe struct InputEventBuffer : IEnumerable, IDisposable, ICloneable { + /// Sentinel value indicating the buffer size is not known. public const long BufferSizeUnknown = -1; /// @@ -266,6 +267,7 @@ public bool Contains(InputEvent* eventPtr) return true; } + /// Clears the buffer and resets the event count to zero. public void Reset() { m_EventCount = 0; @@ -322,6 +324,7 @@ internal void AdvanceToNextEvent(ref InputEvent* currentReadPos, --numRemainingEvents; } + /// Returns an enumerator over all events in the buffer. public IEnumerator GetEnumerator() { return new Enumerator(this); @@ -332,6 +335,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// Releases the native memory used by this event buffer. public void Dispose() { // Nothing to do if we don't actually own the memory. @@ -346,6 +350,7 @@ public void Dispose() m_EventCount = 0; } + /// Creates a copy of this buffer with its own independent memory. public InputEventBuffer Clone() { var clone = new InputEventBuffer(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs b/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs index c8b3a40413..5c17262a95 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs @@ -156,6 +156,7 @@ public event Action onEvent remove => m_EventListeners.RemoveCallback(value); } + /// Initializes a trace that records events for the specified device. public InputEventTrace(InputDevice device, long bufferSizeInBytes = kDefaultBufferSize, bool growBuffer = false, long maxBufferSizeInBytes = -1, long growIncrementSizeInBytes = -1) : this(bufferSizeInBytes, growBuffer, maxBufferSizeInBytes, growIncrementSizeInBytes) @@ -175,6 +176,7 @@ public InputEventTrace(InputDevice device, long bufferSizeInBytes = kDefaultBuff /// size of . This is off by default. /// If is true, this is the maximum size that the buffer should /// be grown to. If the maximum size is reached, old events are being overwritten. + /// How many bytes to add each time the buffer needs to grow. public InputEventTrace(long bufferSizeInBytes = kDefaultBufferSize, bool growBuffer = false, long maxBufferSizeInBytes = -1, long growIncrementSizeInBytes = -1) { m_EventBufferSize = (uint)bufferSizeInBytes; @@ -435,6 +437,7 @@ public void ReadFrom(Stream stream) /// cannot be accessed. /// /// + /// The loaded instance. public static InputEventTrace LoadFrom(string filePath) { if (string.IsNullOrEmpty(filePath)) @@ -682,6 +685,7 @@ public bool GetNextEvent(ref InputEventPtr current) return true; } + /// Returns an enumerator over all recorded events. public IEnumerator GetEnumerator() { return new Enumerator(this); diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/StateEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/StateEvent.cs index 0100af38c8..3694d64ca4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/StateEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/StateEvent.cs @@ -15,10 +15,12 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputEvent.kBaseEventSize + 4 + kStateDataSizeToSubtract, Pack = 1)] public unsafe struct StateEvent : IInputEventTypeInfo { + /// The FourCC type identifier for state events. public const int Type = 0x53544154; // 'STAT' internal const int kStateDataSizeToSubtract = 1; + /// The base header. [FieldOffset(0)] public InputEvent baseEvent; @@ -31,8 +33,10 @@ public unsafe struct StateEvent : IInputEventTypeInfo [FieldOffset(InputEvent.kBaseEventSize + sizeof(int))] internal fixed byte stateData[kStateDataSizeToSubtract]; // Variable-sized. + /// The size in bytes of the state payload in this event. public uint stateSizeInBytes => baseEvent.sizeInBytes - (InputEvent.kBaseEventSize + sizeof(int)); + /// Pointer to the first byte of the state data. public void* state { get @@ -44,6 +48,7 @@ public void* state } } + /// Returns an pointing to this event. public InputEventPtr ToEventPtr() { fixed(StateEvent * ptr = &this) @@ -52,6 +57,7 @@ public InputEventPtr ToEventPtr() } } + /// Static FourCC type code used to identify this event type. public FourCC typeStatic => Type; /// @@ -102,6 +108,7 @@ public static TState GetState(InputEventPtr ptr) return From(ptr)->GetState(); } + /// Returns the total size in bytes of this event including its state payload. public static int GetEventSizeWithPayload() where TState : struct { diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/TextEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/TextEvent.cs index 9c5b43264a..fc1c07710a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/TextEvent.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/TextEvent.cs @@ -17,8 +17,10 @@ namespace UnityEngine.InputSystem.LowLevel [StructLayout(LayoutKind.Explicit, Size = InputEvent.kBaseEventSize + 4)] public struct TextEvent : IInputEventTypeInfo { + /// The FourCC type identifier for text input events. public const int Type = 0x54455854; + /// The base header. [FieldOffset(0)] public InputEvent baseEvent; @@ -28,8 +30,10 @@ public struct TextEvent : IInputEventTypeInfo [FieldOffset(InputEvent.kBaseEventSize)] public int character; + /// Static FourCC type code used to identify this event type. public FourCC typeStatic => Type; + /// Casts the given event pointer to a pointer. public static unsafe TextEvent* From(InputEventPtr eventPtr) { if (!eventPtr.valid) @@ -41,6 +45,7 @@ public struct TextEvent : IInputEventTypeInfo return (TextEvent*)eventPtr.data; } + /// Creates a text event for the given device ID, character, and timestamp. public static TextEvent Create(int deviceId, char character, double time = -1) { ////TODO: detect and throw when if character is surrogate @@ -52,6 +57,7 @@ public static TextEvent Create(int deviceId, char character, double time = -1) return inputEvent; } + /// Creates a text event for the given device ID, Unicode code point, and timestamp. public static TextEvent Create(int deviceId, int character, double time = -1) { var inputEvent = new TextEvent diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/Touch.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/Touch.cs index 67dd61cc1d..576a54d5fa 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/Touch.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/Touch.cs @@ -614,7 +614,7 @@ internal Touch(Finger finger, InputStateHistory.Record touchRecord) m_TouchRecord = touchRecord; } - /// + /// Returns a string representation of this touch. public override string ToString() { if (!valid) @@ -634,13 +634,13 @@ public bool Equals(Touch other) return Equals(m_Finger, other.m_Finger) && m_TouchRecord.Equals(other.m_TouchRecord); } - /// + /// Returns true if the given object is a equal to this one. public override bool Equals(object obj) { return obj is Touch other && Equals(other); } - /// + /// Returns a hash code for this touch. public override int GetHashCode() { unchecked diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs index 108e83e5a4..91d2e0f896 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs @@ -37,10 +37,13 @@ namespace UnityEngine.InputSystem.EnhancedTouch #endif public class TouchSimulation : MonoBehaviour, IInputStateChangeMonitor { + /// The virtual device that simulates touch input from pointer devices. public Touchscreen simulatedTouchscreen { get; private set; } + /// The currently active instance, or null if none is active. public static TouchSimulation instance => s_Instance; + /// Enables touch simulation by activating the simulated touchscreen and monitoring pointer devices. public static void Enable() { if (instance == null) @@ -55,12 +58,14 @@ public static void Enable() instance.enabled = true; } + /// Disables touch simulation and stops monitoring pointer devices. public static void Disable() { if (instance != null) instance.enabled = false; } + /// Disables and destroys this touch simulation instance. public static void Destroy() { Disable(); @@ -72,6 +77,7 @@ public static void Destroy() } } + /// Adds a pointer device to be simulated as touch input. protected void AddPointer(Pointer pointer) { if (pointer == null) @@ -89,6 +95,7 @@ protected void AddPointer(Pointer pointer) InputSystem.DisableDevice(pointer, keepSendingEvents: true); } + /// Removes a pointer device from touch simulation. protected void RemovePointer(Pointer pointer) { if (pointer == null) @@ -240,6 +247,7 @@ private void OnDeviceChange(InputDevice device, InputDeviceChange change) } } + /// Called by Unity when this component is enabled; starts touch simulation. protected void OnEnable() { if (simulatedTouchscreen != null) @@ -272,6 +280,7 @@ protected void OnEnable() InputSystem.onEvent += m_OnEvent; } + /// Called by Unity when this component is disabled; stops touch simulation. protected void OnDisable() { if (simulatedTouchscreen != null && simulatedTouchscreen.added) @@ -393,17 +402,20 @@ void IInputStateChangeMonitor.NotifyTimerExpired(InputControl control, double ti #pragma warning disable CA1801 ////TODO: [Obsolete] + /// Installs state change monitors on the pointer device at the given index. protected void InstallStateChangeMonitors(int startIndex = 0) { } ////TODO: [Obsolete] + /// Called when a monitored pointer control's value changes; converts it to a simulated touch event. protected void OnSourceControlChangedValue(InputControl control, double time, InputEventPtr eventPtr, long sourceDeviceAndButtonIndex) { } ////TODO: [Obsolete] + /// Removes state change monitors from the pointer device at the given index. protected void UninstallStateChangeMonitors(int startIndex = 0) { } diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs index 9becfbe872..8eb206d09c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs @@ -56,6 +56,9 @@ public class HID : InputDevice /// public static FourCC QueryHIDReportDescriptorSizeDeviceCommandType { get { return new FourCC('H', 'I', 'D', 'S'); } } + /// + /// The FourCC code identifying . + /// public static FourCC QueryHIDParsedReportDescriptorDeviceCommandType { get { return new FourCC('H', 'I', 'D', 'P'); } } /// @@ -299,11 +302,17 @@ internal static unsafe HIDDeviceDescriptor ReadHIDDeviceDescriptor(ref InputDevi return hidDeviceDescriptor; } + /// + /// Returns a human-readable name for the given HID usage page. + /// public static string UsagePageToString(UsagePage usagePage) { return (int)usagePage >= 0xFF00 ? "Vendor-Defined" : usagePage.ToString(); } + /// + /// Returns a human-readable name for the given HID usage within the specified usage page. + /// public static string UsageToString(UsagePage usagePage, int usage) { switch (usagePage) @@ -460,37 +469,106 @@ public InputControlLayout Build() } } + /// + /// Type of a HID report as defined in the HID specification. + /// public enum HIDReportType { + /// + /// The report type is not known or not parsed. + /// Unknown, + /// + /// An input report sent from the device to the host. + /// Input, + /// + /// An output report sent from the host to the device. + /// Output, + /// + /// A feature report for bidirectional configuration data. + /// Feature } + /// + /// Type of a HID collection as defined in the HID specification. + /// public enum HIDCollectionType { + /// + /// A group of axes that represents data from one geometric point. + /// Physical = 0x00, + /// + /// A collection that encompasses all the controls that are part of a single application. + /// Application = 0x01, + /// + /// A logical grouping of controls. + /// Logical = 0x02, + /// + /// A collection of items that represent a single report. + /// Report = 0x03, + /// + /// A named array collection. + /// NamedArray = 0x04, + /// + /// A usage switch collection. + /// UsageSwitch = 0x05, + /// + /// A usage modifier collection. + /// UsageModifier = 0x06 } + /// + /// Flags describing a HID element as defined in the HID specification Main item tags. + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Flags", Justification = "No better term for underlying data.")] [Flags] public enum HIDElementFlags { + /// + /// The element reports a constant value (data bit 0 is set). + /// Constant = 1 << 0, + /// + /// The element reports individual controls per usage (as opposed to array). + /// Variable = 1 << 1, + /// + /// The element reports relative values (delta from last report). + /// Relative = 1 << 2, + /// + /// The element wraps around when it reaches its logical bounds. + /// Wrap = 1 << 3, + /// + /// The element represents a non-linear control. + /// NonLinear = 1 << 4, + /// + /// The element has no preferred state (does not return to a neutral state). + /// NoPreferred = 1 << 5, + /// + /// The element has a null (out-of-range) state. + /// NullState = 1 << 6, + /// + /// The element value may change without a host interaction (output/feature only). + /// Volatile = 1 << 7, + /// + /// The element contains a stream of bytes (buffered bytes). + /// BufferedBytes = 1 << 8 } @@ -500,38 +578,107 @@ public enum HIDElementFlags [Serializable] public struct HIDElementDescriptor { + /// + /// The usage ID of the element within its usage page. + /// public int usage; + /// + /// The HID usage page this element belongs to. + /// public UsagePage usagePage; + /// + /// The unit of measurement for the element's value. + /// public int unit; + /// + /// The exponent applied to the unit value (as a power of 10). + /// public int unitExponent; + /// + /// The minimum logical value reported by this element. + /// public int logicalMin; + /// + /// The maximum logical value reported by this element. + /// public int logicalMax; + /// + /// The minimum physical value this element can represent. + /// public int physicalMin; + /// + /// The maximum physical value this element can represent. + /// public int physicalMax; + /// + /// The type of report this element belongs to. + /// public HIDReportType reportType; + /// + /// Index of the collection this element belongs to. + /// public int collectionIndex; + /// + /// The ID of the HID report this element is part of. + /// public int reportId; + /// + /// The size of this element's data in the report, in bits. + /// public int reportSizeInBits; + /// + /// The bit offset of this element within its report. + /// public int reportOffsetInBits; [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "flags", Justification = "No better term for underlying data.")] + /// + /// Flags describing the element's data attributes. + /// public HIDElementFlags flags; // Fields only relevant to arrays. + /// + /// The minimum usage ID when this element represents a usage range. + /// public int? usageMin; + /// + /// The maximum usage ID when this element represents a usage range. + /// public int? usageMax; + /// + /// True if the element has a null state (reports out-of-range values). + /// public bool hasNullState => (flags & HIDElementFlags.NullState) == HIDElementFlags.NullState; + /// + /// True if the element returns to a preferred/neutral state. + /// public bool hasPreferredState => (flags & HIDElementFlags.NoPreferred) != HIDElementFlags.NoPreferred; + /// + /// True if the element is an array (reports index values rather than individual bits). + /// public bool isArray => (flags & HIDElementFlags.Variable) != HIDElementFlags.Variable; + /// + /// True if the element represents a non-linear control. + /// public bool isNonLinear => (flags & HIDElementFlags.NonLinear) == HIDElementFlags.NonLinear; + /// + /// True if the element reports relative values. + /// public bool isRelative => (flags & HIDElementFlags.Relative) == HIDElementFlags.Relative; + /// + /// True if the element always reports a constant value. + /// public bool isConstant => (flags & HIDElementFlags.Constant) == HIDElementFlags.Constant; + /// + /// True if the element value wraps around at its limits. + /// public bool isWrapping => (flags & HIDElementFlags.Wrap) == HIDElementFlags.Wrap; internal bool isSigned => logicalMin < 0; @@ -574,6 +721,9 @@ internal float maxFloatValue } } + /// + /// Returns true if this element matches the given usage page and usage ID. + /// public bool Is(UsagePage usagePage, int usage) { return usagePage == this.usagePage && usage == this.usage; @@ -913,11 +1063,29 @@ internal void AddChildControls(ref HIDElementDescriptor element, string controlN [Serializable] public struct HIDCollectionDescriptor { + /// + /// The type of this HID collection. + /// public HIDCollectionType type; + /// + /// The usage ID of this collection. + /// public int usage; + /// + /// The usage page of this collection. + /// public UsagePage usagePage; + /// + /// Index of the parent collection, or -1 if this is a root collection. + /// public int parent; // -1 if no parent. + /// + /// Number of child collections contained within this collection. + /// public int childCount; + /// + /// Index of the first child collection. + /// public int firstChild; } @@ -945,7 +1113,13 @@ public struct HIDDeviceDescriptor /// USB product ID. /// public int productId; + /// + /// The HID usage ID of the device. + /// public int usage; + /// + /// The HID usage page of the device. + /// public UsagePage usagePage; /// @@ -963,14 +1137,26 @@ public struct HIDDeviceDescriptor /// public int featureReportSize; + /// + /// All elements (controls) described in the HID report descriptor. + /// public HIDElementDescriptor[] elements; + /// + /// All collections described in the HID report descriptor. + /// public HIDCollectionDescriptor[] collections; + /// + /// Serializes this descriptor to a JSON string. + /// public string ToJson() { return JsonUtility.ToJson(this, true); } + /// + /// Deserializes a from a JSON string. + /// public static HIDDeviceDescriptor FromJson(string json) { try @@ -1138,9 +1324,18 @@ public static HIDDeviceDescriptor FromJson(string json) /// public struct HIDDeviceDescriptorBuilder { + /// + /// The HID usage page for the device being described. + /// public UsagePage usagePage; + /// + /// The HID usage ID for the device being described. + /// public int usage; + /// + /// Initializes the builder for a device with the given usage page and usage ID. + /// public HIDDeviceDescriptorBuilder(UsagePage usagePage, int usage) : this() { @@ -1148,11 +1343,17 @@ public HIDDeviceDescriptorBuilder(UsagePage usagePage, int usage) this.usage = usage; } + /// + /// Initializes the builder for a Generic Desktop device with the given usage. + /// public HIDDeviceDescriptorBuilder(GenericDesktop usage) : this(UsagePage.GenericDesktop, (int)usage) { } + /// + /// Starts a new HID report of the given type with the specified report ID. + /// public HIDDeviceDescriptorBuilder StartReport(HIDReportType reportType, int reportId = 1) { m_CurrentReportId = reportId; @@ -1161,6 +1362,9 @@ public HIDDeviceDescriptorBuilder StartReport(HIDReportType reportType, int repo return this; } + /// + /// Adds a new element to the current report with the specified usage page, usage, and bit size. + /// public HIDDeviceDescriptorBuilder AddElement(UsagePage usagePage, int usage, int sizeInBits) { if (m_Elements == null) @@ -1196,11 +1400,17 @@ public HIDDeviceDescriptorBuilder AddElement(UsagePage usagePage, int usage, int return this; } + /// + /// Adds a new Generic Desktop element to the current report with the specified usage and bit size. + /// public HIDDeviceDescriptorBuilder AddElement(GenericDesktop usage, int sizeInBits) { return AddElement(UsagePage.GenericDesktop, (int)usage, sizeInBits); } + /// + /// Sets the physical minimum and maximum for the last added element. + /// public HIDDeviceDescriptorBuilder WithPhysicalMinMax(int min, int max) { var index = m_Elements.Count - 1; @@ -1215,6 +1425,9 @@ public HIDDeviceDescriptorBuilder WithPhysicalMinMax(int min, int max) return this; } + /// + /// Sets the logical minimum and maximum for the last added element. + /// public HIDDeviceDescriptorBuilder WithLogicalMinMax(int min, int max) { var index = m_Elements.Count - 1; @@ -1229,6 +1442,9 @@ public HIDDeviceDescriptorBuilder WithLogicalMinMax(int min, int max) return this; } + /// + /// Completes the builder and returns the resulting . + /// public HIDDeviceDescriptor Finish() { var descriptor = new HIDDeviceDescriptor @@ -1263,30 +1479,105 @@ public HIDDeviceDescriptor Finish() /// public enum UsagePage { + /// + /// Undefined or unknown usage page. + /// Undefined = 0x00, + /// + /// Generic Desktop Controls usage page (page 0x01). + /// GenericDesktop = 0x01, + /// + /// Simulation Controls usage page (page 0x02). + /// Simulation = 0x02, + /// + /// VR Controls usage page (page 0x03). + /// VRControls = 0x03, + /// + /// Sport Controls usage page (page 0x04). + /// SportControls = 0x04, + /// + /// Game Controls usage page (page 0x05). + /// GameControls = 0x05, + /// + /// Generic Device Controls usage page (page 0x06). + /// GenericDeviceControls = 0x06, + /// + /// Keyboard/Keypad usage page (page 0x07). + /// Keyboard = 0x07, + /// + /// LED usage page (page 0x08). + /// LEDs = 0x08, + /// + /// Button usage page (page 0x09). + /// Button = 0x09, + /// + /// Ordinal usage page (page 0x0A). + /// Ordinal = 0x0A, + /// + /// Telephony Device usage page (page 0x0B). + /// Telephony = 0x0B, + /// + /// Consumer usage page (page 0x0C). + /// Consumer = 0x0C, + /// + /// Digitizer usage page (page 0x0D). + /// Digitizer = 0x0D, + /// + /// Physical Interface Device (PID) usage page (page 0x0F). + /// PID = 0x0F, + /// + /// Unicode usage page (page 0x10). + /// Unicode = 0x10, + /// + /// Alphanumeric Display usage page (page 0x14). + /// AlphanumericDisplay = 0x14, + /// + /// Medical Instrument usage page (page 0x40). + /// MedicalInstruments = 0x40, + /// + /// Monitor usage page (page 0x80). + /// Monitor = 0x80, // Starts here and goes up to 0x83. + /// + /// Power Device usage page (page 0x84). + /// Power = 0x84, // Starts here and goes up to 0x87. + /// + /// Bar Code Scanner usage page (page 0x8C). + /// BarCodeScanner = 0x8C, + /// + /// Magnetic Stripe Reader usage page (page 0x8E). + /// MagneticStripeReader = 0x8E, + /// + /// Camera Control usage page (page 0x90). + /// Camera = 0x90, + /// + /// Arcade usage page (page 0x91). + /// Arcade = 0x91, + /// + /// Vendor-defined usage page (page 0xFF00 and above). + /// VendorDefined = 0xFF00, // Starts here and goes up to 0xFFFF. } @@ -1296,140 +1587,527 @@ public enum UsagePage /// public enum GenericDesktop { + /// + /// Undefined Generic Desktop usage. + /// Undefined = 0x00, + /// + /// Pointer device usage (0x01). + /// Pointer = 0x01, + /// + /// Mouse device usage (0x02). + /// Mouse = 0x02, + /// + /// Joystick device usage (0x04). + /// Joystick = 0x04, + /// + /// Gamepad device usage (0x05). + /// Gamepad = 0x05, + /// + /// Keyboard device usage (0x06). + /// Keyboard = 0x06, + /// + /// Keypad device usage (0x07). + /// Keypad = 0x07, + /// + /// Multi-axis controller device usage (0x08). + /// MultiAxisController = 0x08, + /// + /// Tablet PC System Controls device usage (0x09). + /// TabletPCControls = 0x09, + /// + /// Assistive Control device usage (0x0A). + /// AssistiveControl = 0x0A, + /// + /// X axis control (0x30). + /// X = 0x30, + /// + /// Y axis control (0x31). + /// Y = 0x31, + /// + /// Z axis control (0x32). + /// Z = 0x32, + /// + /// Rotation around the X axis (0x33). + /// Rx = 0x33, + /// + /// Rotation around the Y axis (0x34). + /// Ry = 0x34, + /// + /// Rotation around the Z axis (0x35). + /// Rz = 0x35, + /// + /// Slider control (0x36). + /// Slider = 0x36, + /// + /// Dial control (0x37). + /// Dial = 0x37, + /// + /// Wheel control (0x38). + /// Wheel = 0x38, + /// + /// Hat switch control (0x39). + /// HatSwitch = 0x39, + /// + /// Counted buffer (0x3A). + /// CountedBuffer = 0x3A, + /// + /// Byte count (0x3B). + /// ByteCount = 0x3B, + /// + /// Motion wakeup control (0x3C). + /// MotionWakeup = 0x3C, + /// + /// Start button (0x3D). + /// Start = 0x3D, + /// + /// Select button (0x3E). + /// Select = 0x3E, + /// + /// Vector in the X direction (0x40). + /// Vx = 0x40, + /// + /// Vector in the Y direction (0x41). + /// Vy = 0x41, + /// + /// Vector in the Z direction (0x42). + /// Vz = 0x42, + /// + /// Vector of the body rotation around X (0x43). + /// Vbrx = 0x43, + /// + /// Vector of the body rotation around Y (0x44). + /// Vbry = 0x44, + /// + /// Vector of the body rotation around Z (0x45). + /// Vbrz = 0x45, + /// + /// No vector (0x46). + /// Vno = 0x46, + /// + /// Feature notification (0x47). + /// FeatureNotification = 0x47, + /// + /// Resolution multiplier (0x48). + /// ResolutionMultiplier = 0x48, + /// + /// System control collection (0x80). + /// SystemControl = 0x80, + /// + /// System power down (0x81). + /// SystemPowerDown = 0x81, + /// + /// System sleep (0x82). + /// SystemSleep = 0x82, + /// + /// System wake up (0x83). + /// SystemWakeUp = 0x83, + /// + /// System context menu (0x84). + /// SystemContextMenu = 0x84, + /// + /// System main menu (0x85). + /// SystemMainMenu = 0x85, + /// + /// System application menu (0x86). + /// SystemAppMenu = 0x86, + /// + /// System menu help (0x87). + /// SystemMenuHelp = 0x87, + /// + /// System menu exit (0x88). + /// SystemMenuExit = 0x88, + /// + /// System menu select (0x89). + /// SystemMenuSelect = 0x89, + /// + /// System menu right (0x8A). + /// SystemMenuRight = 0x8A, + /// + /// System menu left (0x8B). + /// SystemMenuLeft = 0x8B, + /// + /// System menu up (0x8C). + /// SystemMenuUp = 0x8C, + /// + /// System menu down (0x8D). + /// SystemMenuDown = 0x8D, + /// + /// System cold restart (0x8E). + /// SystemColdRestart = 0x8E, + /// + /// System warm restart (0x8F). + /// SystemWarmRestart = 0x8F, + /// + /// D-pad up direction (0x90). + /// DpadUp = 0x90, + /// + /// D-pad down direction (0x91). + /// DpadDown = 0x91, + /// + /// D-pad right direction (0x92). + /// DpadRight = 0x92, + /// + /// D-pad left direction (0x93). + /// DpadLeft = 0x93, + /// + /// System dock (0xA0). + /// SystemDock = 0xA0, + /// + /// System undock (0xA1). + /// SystemUndock = 0xA1, + /// + /// System setup (0xA2). + /// SystemSetup = 0xA2, + /// + /// System break (0xA3). + /// SystemBreak = 0xA3, + /// + /// System debugger break (0xA4). + /// SystemDebuggerBreak = 0xA4, + /// + /// Application break (0xA5). + /// ApplicationBreak = 0xA5, + /// + /// Application debugger break (0xA6). + /// ApplicationDebuggerBreak = 0xA6, + /// + /// System speaker mute (0xA7). + /// SystemSpeakerMute = 0xA7, + /// + /// System hibernate (0xA8). + /// SystemHibernate = 0xA8, + /// + /// System display invert (0xB0). + /// SystemDisplayInvert = 0xB0, + /// + /// System display internal only (0xB1). + /// SystemDisplayInternal = 0xB1, + /// + /// System display external only (0xB2). + /// SystemDisplayExternal = 0xB2, + /// + /// System display both internal and external (0xB3). + /// SystemDisplayBoth = 0xB3, + /// + /// System display dual (0xB4). + /// SystemDisplayDual = 0xB4, + /// + /// System display toggle internal/external (0xB5). + /// SystemDisplayToggleIntExt = 0xB5, + /// + /// System display swap primary and secondary (0xB6). + /// SystemDisplaySwapPrimarySecondary = 0xB6, + /// + /// System LCD display auto-scale (0xB7). + /// SystemDisplayLCDAutoScale = 0xB7 } + /// + /// HID Simulation Controls usage page (0x02) usages. + /// public enum Simulation { + /// + /// Undefined simulation usage. + /// Undefined = 0x00, + /// + /// Flight simulation device (0x01). + /// FlightSimulationDevice = 0x01, + /// + /// Automobile simulation device (0x02). + /// AutomobileSimulationDevice = 0x02, + /// + /// Tank simulation device (0x03). + /// TankSimulationDevice = 0x03, + /// + /// Spaceship simulation device (0x04). + /// SpaceshipSimulationDevice = 0x04, + /// + /// Submarine simulation device (0x05). + /// SubmarineSimulationDevice = 0x05, + /// + /// Sailing simulation device (0x06). + /// SailingSimulationDevice = 0x06, + /// + /// Motorcycle simulation device (0x07). + /// MotorcycleSimulationDevice = 0x07, + /// + /// Sports simulation device (0x08). + /// SportsSimulationDevice = 0x08, + /// + /// Airplane simulation device (0x09). + /// AirplaneSimulationDevice = 0x09, + /// + /// Helicopter simulation device (0x0A). + /// HelicopterSimulationDevice = 0x0A, + /// + /// Magic carpet simulation device (0x0B). + /// MagicCarpetSimulationDevice = 0x0B, + /// + /// Bicycle simulation device (0x0C). + /// BicylcleSimulationDevice = 0x0C, + /// + /// Flight control stick control (0x20). + /// FlightControlStick = 0x20, + /// + /// Flight stick control (0x21). + /// FlightStick = 0x21, + /// + /// Cyclic control (0x22). + /// CyclicControl = 0x22, + /// + /// Cyclic trim control (0x23). + /// CyclicTrim = 0x23, + /// + /// Flight yoke control (0x24). + /// FlightYoke = 0x24, + /// + /// Track control (0x25). + /// TrackControl = 0x25, + /// + /// Aileron control (0xB0). + /// Aileron = 0xB0, + /// + /// Aileron trim control (0xB1). + /// AileronTrim = 0xB1, + /// + /// Anti-torque control (0xB2). + /// AntiTorqueControl = 0xB2, + /// + /// Autopilot enable control (0xB3). + /// AutopilotEnable = 0xB3, + /// + /// Chaff release control (0xB4). + /// ChaffRelease = 0xB4, + /// + /// Collective control (0xB5). + /// CollectiveControl = 0xB5, + /// + /// Dive brake control (0xB6). + /// DiveBreak = 0xB6, + /// + /// Electronic countermeasures control (0xB7). + /// ElectronicCountermeasures = 0xB7, + /// + /// Elevator control (0xB8). + /// Elevator = 0xB8, + /// + /// Elevator trim control (0xB9). + /// ElevatorTrim = 0xB9, + /// + /// Rudder control (0xBA). + /// Rudder = 0xBA, + /// + /// Throttle control (0xBB). + /// Throttle = 0xBB, + /// + /// Flight communications control (0xBC). + /// FlightCommunications = 0xBC, + /// + /// Flare release control (0xBD). + /// FlareRelease = 0xBD, + /// + /// Landing gear control (0xBE). + /// LandingGear = 0xBE, + /// + /// Toe brake control (0xBF). + /// ToeBreak = 0xBF, + /// + /// Trigger control (0xC0). + /// Trigger = 0xC0, + /// + /// Weapons arm control (0xC1). + /// WeaponsArm = 0xC1, + /// + /// Weapons select control (0xC2). + /// WeaponsSelect = 0xC2, + /// + /// Wing flaps control (0xC3). + /// WingFlaps = 0xC3, + /// + /// Accelerator control (0xC4). + /// Accelerator = 0xC4, + /// + /// Brake control (0xC5). + /// Brake = 0xC5, + /// + /// Clutch control (0xC6). + /// Clutch = 0xC6, + /// + /// Shifter control (0xC7). + /// Shifter = 0xC7, + /// + /// Steering control (0xC8). + /// Steering = 0xC8, + /// + /// Turret direction control (0xC9). + /// TurretDirection = 0xC9, + /// + /// Barrel elevation control (0xCA). + /// BarrelElevation = 0xCA, + /// + /// Dive plane control (0xCB). + /// DivePlane = 0xCB, + /// + /// Ballast control (0xCC). + /// Ballast = 0xCC, + /// + /// Bicycle crank control (0xCD). + /// BicycleCrank = 0xCD, + /// + /// Handle bars control (0xCE). + /// HandleBars = 0xCE, + /// + /// Front brake control (0xCF). + /// FrontBrake = 0xCF, + /// + /// Rear brake control (0xD0). + /// RearBrake = 0xD0 } + /// + /// HID Button usage page (0x09) usages. + /// public enum Button { + /// + /// Undefined button usage. + /// Undefined = 0, + /// + /// Primary button (button 1). + /// Primary, + /// + /// Secondary button (button 2). + /// Secondary, + /// + /// Tertiary button (button 3). + /// Tertiary } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HIDSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HIDSupport.cs index 842d96bb42..42e04ee704 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HIDSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HIDSupport.cs @@ -50,6 +50,8 @@ public struct HIDPageUsage /// /// Create a HIDPageUsage struct by specifying a page and usage. /// + /// The HID usage page. + /// The usage ID within the page. public HIDPageUsage(HID.UsagePage page, int usage) { this.page = page; @@ -59,6 +61,7 @@ public HIDPageUsage(HID.UsagePage page, int usage) /// /// Create a HIDPageUsage struct from the GenericDesktop usage page by specifying the usage. /// + /// The Generic Desktop usage ID. public HIDPageUsage(HID.GenericDesktop usage) { page = HID.UsagePage.GenericDesktop; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenControl.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenControl.cs index 06b464802f..821f962e67 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenControl.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenControl.cs @@ -190,6 +190,7 @@ private void SetupInputControl() s_OnScreenDevices[deviceInfoIndex].AddControl(this); } + /// Sends the given value to the on-screen control's target control. protected void SendValueToControl(TValue value) where TValue : struct { @@ -206,6 +207,7 @@ protected void SendValueToControl(TValue value) InputSystem.QueueEvent(m_InputEventPtr); } + /// Resets the target control to its default value. protected void SentDefaultValueToControl() { if (m_Control == null) @@ -221,6 +223,7 @@ protected void SentDefaultValueToControl() internal static bool HasAnyActive => s_nbActiveInstances != 0; private static int s_nbActiveInstances = 0; + /// Called by Unity when this component is enabled; registers the on-screen control. protected virtual void OnEnable() { ++s_nbActiveInstances; @@ -253,6 +256,7 @@ protected virtual void OnEnable() } } + /// Called by Unity when this component is disabled; unregisters the on-screen control. protected virtual void OnDisable() { --s_nbActiveInstances; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.cs index 6c8dea7ae7..a970232e00 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.cs @@ -38,7 +38,9 @@ namespace UnityEngine.InputSystem /// public class DefaultInputActions : IInputActionCollection2, IDisposable { + /// The underlying containing all actions defined in this class. public InputActionAsset asset { get; } + /// Creates a new instance and loads the default input action asset. public @DefaultInputActions() { asset = InputActionAsset.FromJson(@"{ @@ -899,30 +901,36 @@ public @DefaultInputActions() m_UI_TrackedDeviceOrientation = m_UI.FindAction("TrackedDeviceOrientation", throwIfNotFound: true); } + /// Releases the underlying . public void Dispose() { UnityEngine.Object.Destroy(asset); } + /// Optional mask that restricts which bindings are active. public InputBinding? bindingMask { get => asset.bindingMask; set => asset.bindingMask = value; } + /// Optional list of devices that actions in this asset are restricted to. public ReadOnlyArray? devices { get => asset.devices; set => asset.devices = value; } + /// The control schemes defined in the underlying asset. public ReadOnlyArray controlSchemes => asset.controlSchemes; + /// Returns true if the given action is part of this asset. public bool Contains(InputAction action) { return asset.Contains(action); } + /// Returns an enumerator that iterates over all actions in this asset. public IEnumerator GetEnumerator() { return asset.GetEnumerator(); @@ -933,23 +941,28 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// Enables all action maps in this asset. public void Enable() { asset.Enable(); } + /// Disables all action maps in this asset. public void Disable() { asset.Disable(); } + /// All bindings across all actions in this asset. public IEnumerable bindings => asset.bindings; + /// Finds and returns the action with the given name or null if not found. public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false) { return asset.FindAction(actionNameOrId, throwIfNotFound); } + /// Finds the index of the given binding and outputs the action it belongs to. public int FindBinding(InputBinding bindingMask, out InputAction action) { return asset.FindBinding(bindingMask, out action); @@ -961,18 +974,29 @@ public int FindBinding(InputBinding bindingMask, out InputAction action) private readonly InputAction m_Player_Move; private readonly InputAction m_Player_Look; private readonly InputAction m_Player_Fire; + /// Provides typed access to all actions in the Player action map. public struct PlayerActions { private @DefaultInputActions m_Wrapper; + /// Initializes the accessor for the given instance. public PlayerActions(@DefaultInputActions wrapper) { m_Wrapper = wrapper; } + /// The Move action (2D movement input). public InputAction @Move => m_Wrapper.m_Player_Move; + /// The Look action (2D look/camera input). public InputAction @Look => m_Wrapper.m_Player_Look; + /// The Fire action (attack/primary action input). public InputAction @Fire => m_Wrapper.m_Player_Fire; + /// Returns the underlying . public InputActionMap Get() { return m_Wrapper.m_Player; } + /// Enables the Player action map. public void Enable() { Get().Enable(); } + /// Disables the Player action map. public void Disable() { Get().Disable(); } + /// True if the Player action map is currently enabled. public bool enabled => Get().enabled; + /// Implicit conversion to . public static implicit operator InputActionMap(PlayerActions set) { return set.Get(); } + /// Registers a callback object to receive events for all Player actions. public void SetCallbacks(IPlayerActions instance) { if (m_Wrapper.m_PlayerActionsCallbackInterface != null) @@ -1002,6 +1026,7 @@ public void SetCallbacks(IPlayerActions instance) } } } + /// The Player action map accessor. public PlayerActions @Player => new PlayerActions(this); // UI @@ -1017,25 +1042,43 @@ public void SetCallbacks(IPlayerActions instance) private readonly InputAction m_UI_RightClick; private readonly InputAction m_UI_TrackedDevicePosition; private readonly InputAction m_UI_TrackedDeviceOrientation; + /// Provides typed access to all actions in the UI action map. public struct UIActions { private @DefaultInputActions m_Wrapper; + /// Initializes the accessor for the given instance. public UIActions(@DefaultInputActions wrapper) { m_Wrapper = wrapper; } + /// The Navigate action (UI navigation input). public InputAction @Navigate => m_Wrapper.m_UI_Navigate; + /// The Submit action (UI confirm input). public InputAction @Submit => m_Wrapper.m_UI_Submit; + /// The Cancel action (UI cancel input). public InputAction @Cancel => m_Wrapper.m_UI_Cancel; + /// The Point action (pointer/cursor position). public InputAction @Point => m_Wrapper.m_UI_Point; + /// The Click action (pointer primary click). public InputAction @Click => m_Wrapper.m_UI_Click; + /// The ScrollWheel action (scroll wheel delta). public InputAction @ScrollWheel => m_Wrapper.m_UI_ScrollWheel; + /// The MiddleClick action (pointer middle button click). public InputAction @MiddleClick => m_Wrapper.m_UI_MiddleClick; + /// The RightClick action (pointer right button click). public InputAction @RightClick => m_Wrapper.m_UI_RightClick; + /// The TrackedDevicePosition action (XR tracked device world position). public InputAction @TrackedDevicePosition => m_Wrapper.m_UI_TrackedDevicePosition; + /// The TrackedDeviceOrientation action (XR tracked device world orientation). public InputAction @TrackedDeviceOrientation => m_Wrapper.m_UI_TrackedDeviceOrientation; + /// Returns the underlying . public InputActionMap Get() { return m_Wrapper.m_UI; } + /// Enables the UI action map. public void Enable() { Get().Enable(); } + /// Disables the UI action map. public void Disable() { Get().Disable(); } + /// True if the UI action map is currently enabled. public bool enabled => Get().enabled; + /// Implicit conversion to . public static implicit operator InputActionMap(UIActions set) { return set.Get(); } + /// Registers a callback object to receive events for all UI actions. public void SetCallbacks(IUIActions instance) { if (m_Wrapper.m_UIActionsCallbackInterface != null) @@ -1107,8 +1150,10 @@ public void SetCallbacks(IUIActions instance) } } } + /// The UI action map accessor. public UIActions @UI => new UIActions(this); private int m_KeyboardMouseSchemeIndex = -1; + /// The Keyboard&Mouse control scheme. public InputControlScheme KeyboardMouseScheme { get @@ -1118,6 +1163,7 @@ public InputControlScheme KeyboardMouseScheme } } private int m_GamepadSchemeIndex = -1; + /// The Gamepad control scheme. public InputControlScheme GamepadScheme { get @@ -1127,6 +1173,7 @@ public InputControlScheme GamepadScheme } } private int m_TouchSchemeIndex = -1; + /// The Touch control scheme. public InputControlScheme TouchScheme { get @@ -1136,6 +1183,7 @@ public InputControlScheme TouchScheme } } private int m_JoystickSchemeIndex = -1; + /// The Joystick control scheme. public InputControlScheme JoystickScheme { get @@ -1145,6 +1193,7 @@ public InputControlScheme JoystickScheme } } private int m_XRSchemeIndex = -1; + /// The XR control scheme. public InputControlScheme XRScheme { get @@ -1153,23 +1202,38 @@ public InputControlScheme XRScheme return asset.controlSchemes[m_XRSchemeIndex]; } } + /// Callback interface for receiving Player action events. public interface IPlayerActions { + /// Called when the Move action fires. void OnMove(InputAction.CallbackContext context); + /// Called when the Look action fires. void OnLook(InputAction.CallbackContext context); + /// Called when the Fire action fires. void OnFire(InputAction.CallbackContext context); } + /// Callback interface for receiving UI action events. public interface IUIActions { + /// Called when the Navigate action fires. void OnNavigate(InputAction.CallbackContext context); + /// Called when the Submit action fires. void OnSubmit(InputAction.CallbackContext context); + /// Called when the Cancel action fires. void OnCancel(InputAction.CallbackContext context); + /// Called when the Point action fires. void OnPoint(InputAction.CallbackContext context); + /// Called when the Click action fires. void OnClick(InputAction.CallbackContext context); + /// Called when the ScrollWheel action fires. void OnScrollWheel(InputAction.CallbackContext context); + /// Called when the MiddleClick action fires. void OnMiddleClick(InputAction.CallbackContext context); + /// Called when the RightClick action fires. void OnRightClick(InputAction.CallbackContext context); + /// Called when the TrackedDevicePosition action fires. void OnTrackedDevicePosition(InputAction.CallbackContext context); + /// Called when the TrackedDeviceOrientation action fires. void OnTrackedDeviceOrientation(InputAction.CallbackContext context); } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputManager.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputManager.cs index 476f984213..b85f4a6da4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputManager.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputManager.cs @@ -44,6 +44,7 @@ public class PlayerInputManager : MonoBehaviour /// public const string PlayerJoinedMessage = "OnPlayerJoined"; + /// Message name sent when a player leaves. public const string PlayerLeftMessage = "OnPlayerLeft"; /// @@ -216,12 +217,14 @@ public InputActionProperty joinAction } } + /// How the manager notifies listeners when players join or leave. public PlayerNotifications notificationBehavior { get => m_NotificationBehavior; set => m_NotificationBehavior = value; } + /// Unity event invoked when a player joins. public PlayerJoinedEvent playerJoinedEvent { get @@ -232,6 +235,7 @@ public PlayerJoinedEvent playerJoinedEvent } } + /// Unity event invoked when a player leaves. public PlayerLeftEvent playerLeftEvent { get @@ -242,6 +246,7 @@ public PlayerLeftEvent playerLeftEvent } } + /// C# callback invoked when a player joins. public event Action onPlayerJoined { add @@ -258,6 +263,7 @@ public event Action onPlayerJoined } } + /// C# callback invoked when a player leaves. public event Action onPlayerLeft { add @@ -409,6 +415,7 @@ public void JoinPlayerFromAction(InputAction.CallbackContext context) JoinPlayer(pairWithDevice: device); } + /// Joins a new player using the device that triggered the given action, if not already joined. public void JoinPlayerFromActionIfNotAlreadyJoined(InputAction.CallbackContext context) { if (!CheckIfPlayerCanJoin()) @@ -800,11 +807,13 @@ internal void NotifyPlayerLeft(PlayerInput player) } } + /// A serializable Unity event raised when a player joins. [Serializable] public class PlayerJoinedEvent : UnityEvent { } + /// A serializable Unity event raised when a player leaves. [Serializable] public class PlayerLeftEvent : UnityEvent { diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUser.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUser.cs index 292c2d509e..390d32909b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUser.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUser.cs @@ -35,6 +35,7 @@ namespace UnityEngine.InputSystem.Users /// public struct InputUser : IEquatable { + /// Sentinel ID value indicating no valid user. public const uint InvalidId = 0; static readonly ProfilerMarker k_InputUserOnChangeMarker = new ProfilerMarker("InputUser.onChange"); @@ -103,8 +104,11 @@ public int index ////TODO: bring documentation for these back when user management is implemented on Xbox and PS ////For now the docs are filtered out (see Documentation~/filter.yml) + /// The platform-specific account handle associated with this user, if any. public InputUserAccountHandle? platformUserAccountHandle => s_GlobalState.allUserData[index].platformUserAccountHandle; + /// The display name of the platform user account associated with this user, if any. public string platformUserAccountName => s_GlobalState.allUserData[index].platformUserAccountName; + /// The platform-specific unique ID of the user account, if any. public string platformUserAccountId => s_GlobalState.allUserData[index].platformUserAccountId; ////REVIEW: Does it make sense to track used devices separately from paired devices? @@ -416,6 +420,7 @@ public static int listenForUnpairedDeviceActivity } } + /// Returns a string representation of this user. public override string ToString() { if (!valid) @@ -484,6 +489,7 @@ public void AssociateActionsWithUser(IInputActionCollection actions) } } + /// Activates the control scheme with the given name for this user and returns a fluent syntax object. public ControlSchemeChangeSyntax ActivateControlScheme(string schemeName) { // Look up control scheme by name in actions. @@ -532,6 +538,7 @@ internal void FindControlScheme(string schemeName, out InputControlScheme scheme $"Cannot find control scheme '{schemeName}' in actions '{s_GlobalState.allUserData[index].actions}'"); } + /// Activates the given control scheme for this user and returns a fluent syntax object. public ControlSchemeChangeSyntax ActivateControlScheme(InputControlScheme scheme) { var userIndex = index; // Throws if user is invalid. @@ -769,6 +776,7 @@ public static int GetUnpairedInputDevices(ref InputControlList list } ////Doc is filtered out (see Documentation~/filter.yml) + /// Finds and returns the user associated with the given platform account handle, or null if not found. public static InputUser? FindUserByAccount(InputUserAccountHandle platformUserAccountHandle) { if (platformUserAccountHandle == default(InputUserAccountHandle)) @@ -781,6 +789,7 @@ public static int GetUnpairedInputDevices(ref InputControlList list return s_GlobalState.allUsers[userIndex]; } + /// Creates a new user without any paired devices. public static InputUser CreateUserWithoutPairedDevices() { var userIndex = AddUser(); @@ -827,6 +836,7 @@ public static InputUser CreateUserWithoutPairedDevices() /// /// /// + /// The user that was paired with the device, which may be the given user or a newly created one. public static InputUser PerformPairingWithDevice(InputDevice device, InputUser user = default, InputUserPairingOptions options = InputUserPairingOptions.None) @@ -913,11 +923,13 @@ private static bool InitiateUserAccountSelection(int userIndex, InputDevice devi return false; } + /// Returns true if this user is the same user as the given one. public bool Equals(InputUser other) { return m_Id == other.m_Id; } + /// Returns true if the given object is an representing the same user. public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) @@ -925,16 +937,19 @@ public override bool Equals(object obj) return obj is InputUser && Equals((InputUser)obj); } + /// Returns a hash code for this user. public override int GetHashCode() { return (int)m_Id; } + /// Returns true if both values refer to the same user. public static bool operator==(InputUser left, InputUser right) { return left.m_Id == right.m_Id; } + /// Returns true if the two values refer to different users. public static bool operator!=(InputUser left, InputUser right) { return left.m_Id != right.m_Id; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserAccountHandle.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserAccountHandle.cs index c4f2fe1782..77ad6554d3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserAccountHandle.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserAccountHandle.cs @@ -23,11 +23,13 @@ public string apiName get { return m_ApiName; } } + /// The raw platform-specific handle value. public ulong handle { get { return m_Handle; } } + /// Initializes a handle with the given platform name and raw value. public InputUserAccountHandle(string apiName, ulong handle) { if (string.IsNullOrEmpty(apiName)) @@ -37,6 +39,7 @@ public InputUserAccountHandle(string apiName, ulong handle) m_Handle = handle; } + /// Returns a string representation of this handle. public override string ToString() { if (m_ApiName == null) @@ -45,11 +48,13 @@ public override string ToString() return string.Format("{0}({1})", m_ApiName, m_Handle); } + /// Returns true if both handles refer to the same platform account. public bool Equals(InputUserAccountHandle other) { return string.Equals(apiName, other.apiName) && Equals(handle, other.handle); } + /// Returns true if the given object is an referring to the same account. public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) @@ -57,16 +62,19 @@ public override bool Equals(object obj) return obj is InputUserAccountHandle && Equals((InputUserAccountHandle)obj); } + /// Returns true if both handles refer to the same platform account. public static bool operator==(InputUserAccountHandle left, InputUserAccountHandle right) { return left.Equals(right); } + /// Returns true if the two handles refer to different platform accounts. public static bool operator!=(InputUserAccountHandle left, InputUserAccountHandle right) { return !left.Equals(right); } + /// Returns a hash code for this handle. public override int GetHashCode() { unchecked diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserChange.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserChange.cs index 857f521104..d8c02b7b65 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserChange.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/Users/InputUserChange.cs @@ -74,10 +74,15 @@ public enum InputUserChange DeviceRegained, ////TODO: bring documentation for these back when user management is implemented on Xbox and PS + /// The platform user account associated with the user has changed. AccountChanged, + /// The display name of the user's platform account has changed. AccountNameChanged, + /// A platform account selection UI is currently shown to the user. AccountSelectionInProgress, + /// The user canceled the account selection UI without selecting an account. AccountSelectionCanceled, + /// The user successfully selected an account in the platform account selection UI. AccountSelectionComplete, ////REVIEW: send notifications about the matching status of the control scheme? maybe ControlSchemeActivated, ControlSchemeDeactivated, diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/IXboxOneRumble.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/IXboxOneRumble.cs index 19d9753cee..fce6f10d5d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/IXboxOneRumble.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/IXboxOneRumble.cs @@ -7,6 +7,7 @@ namespace UnityEngine.InputSystem.XInput /// public interface IXboxOneRumble : IDualMotorRumble { + /// Sets the speeds of all four Xbox One rumble motors. void SetMotorSpeeds(float lowFrequency, float highFrequency, float leftTrigger, float rightTrigger); } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XInputController.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XInputController.cs index 870ae9a7d5..60e37c3dff 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XInputController.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XInputController.cs @@ -156,14 +156,10 @@ internal enum DeviceType /// public enum DeviceSubType { - /// - /// The controller type is unknown. - /// + /// The controller subtype is unknown. Unknown = 0x00, - /// - /// Gamepad controller. - /// + /// Standard Xbox gamepad. /// /// Includes left and right stick as and , /// left and right trigger as and , @@ -176,9 +172,7 @@ public enum DeviceSubType /// Gamepad = 0x01, - /// - /// Racing wheel controller. - /// + /// Racing wheel controller. /// /// x-axis reports the wheel rotation, /// is the acceleration pedal, and @@ -192,9 +186,7 @@ public enum DeviceSubType /// Wheel = 0x02, - /// - /// Arcade stick controller. - /// + /// Arcade stick controller. /// /// Includes a Digital Stick that reports as a (up, down, left, right), /// and most standard buttons (, , @@ -207,9 +199,7 @@ public enum DeviceSubType /// ArcadeStick = 0x03, - /// - /// Flight stick controller. - /// + /// Flight stick controller. /// /// Includes a pitch and roll stick that reports as the , a POV Hat which /// reports as the , a rudder (handle twist or rocker) that reports as @@ -223,9 +213,7 @@ public enum DeviceSubType /// FlightStick = 0x04, - /// - /// Dance pad controller. - /// + /// Dance pad controller. /// /// Includes the and standard buttons (, /// , , @@ -234,9 +222,7 @@ public enum DeviceSubType /// DancePad = 0x05, - /// - /// Guitar controller. - /// + /// Guitar controller. /// /// The strum bar maps to (up and down), and the frets are assigned to /// (green), (red), @@ -252,18 +238,14 @@ public enum DeviceSubType /// Guitar = 0x06, - /// - /// Alternate guitar controller. - /// + /// Alternate guitar controller. /// /// Similar to but supports a larger range of movement for the vertical orientation /// sensor. /// GuitarAlternate = 0x07, - /// - /// Drum kit controller. - /// + /// Drum kit controller. /// /// The drum pads are assigned to buttons: for green (Floor Tom), /// for red (Snare Drum), @@ -276,17 +258,13 @@ public enum DeviceSubType /// DrumKit = 0x08, - /// - /// Bass guitar controller. - /// + /// Bass guitar controller. /// /// Identical to , with the distinct subtype to simplify setup. /// GuitarBass = 0x0B, - /// - /// Arcade pad controller. - /// + /// Arcade pad controller. /// /// Includes Directional Pad and most standard buttons /// (, , @@ -310,10 +288,15 @@ public enum DeviceSubType [Flags] public new enum DeviceFlags { + /// The controller supports force feedback (rumble). ForceFeedbackSupported = 0x01, + /// The controller is connected wirelessly. Wireless = 0x02, + /// The controller has a voice headset attached. VoiceSupported = 0x04, + /// The controller supports plugin modules (e.g. memory units). PluginModulesSupported = 0x08, + /// The controller does not provide navigation buttons. NoNavigation = 0x10, } diff --git a/Packages/com.unity.inputsystem/InputSystem/State/IInputStateTypeInfo.cs b/Packages/com.unity.inputsystem/InputSystem/State/IInputStateTypeInfo.cs index 3a99a34610..d6904c92dc 100644 --- a/Packages/com.unity.inputsystem/InputSystem/State/IInputStateTypeInfo.cs +++ b/Packages/com.unity.inputsystem/InputSystem/State/IInputStateTypeInfo.cs @@ -7,6 +7,7 @@ namespace UnityEngine.InputSystem.LowLevel /// public interface IInputStateTypeInfo { + /// The FourCC format code identifying this state struct type. FourCC format { get; } } } diff --git a/Packages/com.unity.inputsystem/InputSystem/State/InputState.cs b/Packages/com.unity.inputsystem/InputSystem/State/InputState.cs index 69bae00f6b..890fb619e5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/State/InputState.cs +++ b/Packages/com.unity.inputsystem/InputSystem/State/InputState.cs @@ -32,6 +32,7 @@ public static class InputState /// public static uint updateCount => InputUpdate.s_UpdateStepCount; + /// The current input time, which advances with each input update. public static double currentTime => InputRuntime.s_Instance.currentTime - InputRuntime.s_CurrentTimeOffsetToRealtimeSinceStartup; /// @@ -48,6 +49,7 @@ public static event Action onChange remove => InputSystem.manager.onDeviceStateChange -= value; } + /// Applies the state described by the given event to the given device. public static unsafe void Change(InputDevice device, InputEventPtr eventPtr, InputUpdateType updateType = default) { if (device == null) @@ -82,6 +84,11 @@ public static unsafe void Change(InputDevice device, InputEventPtr eventPtr, Inp /// /// Perform one update of input state. /// + /// The type of the state struct. + /// The control whose state to change. + /// The new state value to apply. + /// The type of update to apply the state change in. + /// Optional event to associate with the state change. /// /// Incorporates the given state and triggers all state change monitors as needed. /// @@ -100,6 +107,11 @@ public static void Change(InputControl control, TState state, InputUpdat /// /// Perform one update of input state. /// + /// The type of the state struct. + /// The control whose state to change. + /// The new state value to apply, passed by reference. + /// The type of update to apply the state change in. + /// Optional event to associate with the state change. /// /// Incorporates the given state and triggers all state change monitors as needed. /// @@ -131,6 +143,7 @@ public static unsafe void Change(InputControl control, ref TState state, eventPtr: eventPtr); } + /// Returns true if the given FourCC format code represents an integer data type. public static bool IsIntegerFormat(this FourCC format) { return format == InputStateBlock.FormatBit || @@ -210,6 +223,7 @@ public static void AddChangeMonitor(InputControl control, IInputStateChangeMonit InputSystem.manager.AddStateChangeMonitor(control, monitor, monitorIndex, groupIndex); } + /// Registers a monitor that is notified whenever the state of the given control changes. public static IInputStateChangeMonitor AddChangeMonitor(InputControl control, NotifyControlValueChangeAction valueChangeCallback, int monitorIndex = -1, NotifyTimerExpiredAction timerExpiredCallback = null) @@ -225,6 +239,7 @@ public static IInputStateChangeMonitor AddChangeMonitor(InputControl control, return monitor; } + /// Removes a previously registered state change monitor. public static void RemoveChangeMonitor(InputControl control, IInputStateChangeMonitor monitor, long monitorIndex = -1) { if (control == null) @@ -256,6 +271,7 @@ public static void AddChangeMonitorTimeout(InputControl control, IInputStateChan InputSystem.manager.AddStateChangeMonitorTimeout(control, monitor, time, monitorIndex, timerIndex); } + /// Removes a timeout previously registered with a state change monitor. public static void RemoveChangeMonitorTimeout(IInputStateChangeMonitor monitor, long monitorIndex = -1, int timerIndex = -1) { if (monitor == null) diff --git a/Packages/com.unity.inputsystem/InputSystem/State/InputStateBlock.cs b/Packages/com.unity.inputsystem/InputSystem/State/InputStateBlock.cs index 7dd0800305..7cc9a250a0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/State/InputStateBlock.cs +++ b/Packages/com.unity.inputsystem/InputSystem/State/InputStateBlock.cs @@ -27,7 +27,9 @@ namespace UnityEngine.InputSystem.LowLevel /// public unsafe struct InputStateBlock { + /// Sentinel value indicating that an offset has not been assigned yet. public const uint InvalidOffset = 0xffffffff; + /// Sentinel value indicating the input system should assign the offset automatically. public const uint AutomaticOffset = 0xfffffffe; /// @@ -125,19 +127,28 @@ public unsafe struct InputStateBlock internal const int kFormatDouble = 'D' << 24 | 'B' << 16 | 'L' << 8 | ' '; ////REVIEW: are these really useful? + /// FourCC format code for a two-component float vector state. public static readonly FourCC FormatVector2 = new FourCC('V', 'E', 'C', '2'); internal const int kFormatVector2 = 'V' << 24 | 'E' << 16 | 'C' << 8 | '2'; + /// FourCC format code for a three-component float vector state. public static readonly FourCC FormatVector3 = new FourCC('V', 'E', 'C', '3'); internal const int kFormatVector3 = 'V' << 24 | 'E' << 16 | 'C' << 8 | '3'; + /// FourCC format code for a quaternion state. public static readonly FourCC FormatQuaternion = new FourCC('Q', 'U', 'A', 'T'); internal const int kFormatQuaternion = 'Q' << 24 | 'U' << 16 | 'A' << 8 | 'T'; + /// FourCC format code for a two-component short integer vector state. public static readonly FourCC FormatVector2Short = new FourCC('V', 'C', '2', 'S'); + /// FourCC format code for a three-component short integer vector state. public static readonly FourCC FormatVector3Short = new FourCC('V', 'C', '3', 'S'); + /// FourCC format code for a two-component byte vector state. public static readonly FourCC FormatVector2Byte = new FourCC('V', 'C', '2', 'B'); + /// FourCC format code for a three-component byte vector state. public static readonly FourCC FormatVector3Byte = new FourCC('V', 'C', '3', 'B'); + /// FourCC format code for a pose (position + rotation) state. public static readonly FourCC FormatPose = new FourCC('P', 'o', 's', 'e'); internal const int kFormatPose = 'P' << 24 | 'o' << 16 | 's' << 8 | 'e'; + /// Returns the size in bits of the primitive data type identified by the given FourCC format code. public static int GetSizeOfPrimitiveFormatInBits(FourCC type) { if (type == FormatBit || type == FormatSBit) @@ -171,6 +182,7 @@ public static int GetSizeOfPrimitiveFormatInBits(FourCC type) return -1; } + /// Returns the FourCC format code corresponding to the given C# primitive type. public static FourCC GetPrimitiveFormatFromType(Type type) { if (ReferenceEquals(type, typeof(int))) @@ -218,6 +230,7 @@ public static FourCC GetPrimitiveFormatFromType(Type type) // During setup, this can be InvalidOffset to indicate a control that should be placed // at an offset automatically; otherwise it denotes a fixed offset relative to the // parent control. + /// The byte offset of this block within the device's state buffer. public uint byteOffset { get => m_ByteOffset; @@ -232,6 +245,7 @@ public uint byteOffset // Bit offset from the given byte offset. Also zero-based (i.e. first bit is at bit // offset #0). + /// The bit offset of this block within its byte. public uint bitOffset { get; set; } // Size of the state in bits. If this % 8 is not 0, the control is considered a @@ -239,12 +253,14 @@ public uint byteOffset // During setup, if this field is 0 it means the size of the control should be automatically // computed from either its children (if it has any) or its set format. If it has neither, // setup will throw. + /// The size of this state block in bits. public uint sizeInBits { get; set; } internal uint alignedSizeInBytes => (sizeInBits + 7) >> 3; internal uint effectiveByteOffset => byteOffset + (bitOffset >> 3); internal uint effectiveBitOffset => byteOffset * 8 + bitOffset; + /// Reads an integer value from this block in the given state buffer. public int ReadInt(void* statePtr) { Debug.Assert(sizeInBits != 0); @@ -295,6 +311,7 @@ public int ReadInt(void* statePtr) } } + /// Writes an integer value into this block in the given state buffer. public void WriteInt(void* statePtr, int value) { Debug.Assert(sizeInBits != 0); @@ -352,6 +369,7 @@ public void WriteInt(void* statePtr, int value) } } + /// Reads a float value from this block in the given state buffer. public float ReadFloat(void* statePtr) { Debug.Assert(sizeInBits != 0); @@ -412,6 +430,7 @@ public float ReadFloat(void* statePtr) } } + /// Writes a float value into this block in the given state buffer. public void WriteFloat(void* statePtr, float value) { var valuePtr = (byte*)statePtr + (int)byteOffset; @@ -540,6 +559,7 @@ internal PrimitiveValue FloatToPrimitiveValue(float value) ////REVIEW: This is some bad code duplication here between Read/WriteFloat&Double but given that there's no //// way to use a type argument here, not sure how to get rid of it. + /// Reads a double value from this block in the given state buffer. public double ReadDouble(void* statePtr) { Debug.Assert(sizeInBits != 0); @@ -602,6 +622,7 @@ public double ReadDouble(void* statePtr) } } + /// Writes a double value into this block in the given state buffer. public void WriteDouble(void* statePtr, double value) { var valuePtr = (byte*)statePtr + (int)byteOffset; @@ -671,6 +692,7 @@ public void WriteDouble(void* statePtr, double value) } } + /// Writes a into this block in the given state buffer. public void Write(void* statePtr, PrimitiveValue value) { var valuePtr = (byte*)statePtr + (int)byteOffset; @@ -736,6 +758,7 @@ public void Write(void* statePtr, PrimitiveValue value) } } + /// Copies the state data for this block from one buffer into another. public void CopyToFrom(void* toStatePtr, void* fromStatePtr) { if (bitOffset != 0 || sizeInBits % 8 != 0) diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/Comparers.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/Comparers.cs index 48018d3907..88983fb3e5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/Comparers.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/Comparers.cs @@ -22,6 +22,7 @@ namespace UnityEngine.InputSystem.Utilities /// public struct Vector2MagnitudeComparer : IComparer { + /// Compares two vectors by magnitude; returns negative, zero, or positive. public int Compare(Vector2 x, Vector2 y) { var lenx = x.sqrMagnitude; @@ -55,6 +56,7 @@ public int Compare(Vector2 x, Vector2 y) /// public struct Vector3MagnitudeComparer : IComparer { + /// Compares two vectors by magnitude; returns negative, zero, or positive. public int Compare(Vector3 x, Vector3 y) { var lenx = x.sqrMagnitude; diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/DisplayStringFormatAttribute.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/DisplayStringFormatAttribute.cs index 6177a5f845..624f562a6f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/DisplayStringFormatAttribute.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/DisplayStringFormatAttribute.cs @@ -14,6 +14,7 @@ public class DisplayStringFormatAttribute : Attribute /// public string formatString { get; set; } + /// Initializes the attribute with the given display string format. public DisplayStringFormatAttribute(string formatString) { this.formatString = formatString; diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/FourCC.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/FourCC.cs index 4e1c220baf..a8e969f83d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/FourCC.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/FourCC.cs @@ -164,12 +164,14 @@ public override int GetHashCode() } // Make annoying Microsoft code analyzer happy. + /// Creates a from the given 32-bit integer. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static FourCC FromInt32(int i) { return i; } + /// Converts the given to a 32-bit integer. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int ToInt32(FourCC fourCC) { diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/InternedString.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/InternedString.cs index 8badfff055..6d0141e5b1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/InternedString.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/InternedString.cs @@ -137,6 +137,7 @@ public bool Equals(InternedString other) return ReferenceEquals(m_StringLowerCase, other.m_StringLowerCase); } + /// Compares this interned string to another for ordering purposes. public int CompareTo(InternedString other) { return string.Compare(m_StringLowerCase, other.m_StringLowerCase, @@ -154,47 +155,56 @@ public override int GetHashCode() return m_StringLowerCase.GetHashCode(); } + /// Returns the plain string value of this interned string. public override string ToString() { return m_StringOriginalCase ?? string.Empty; } + /// Returns true if both interned strings have the same value. public static bool operator==(InternedString a, InternedString b) { return a.Equals(b); } + /// Returns true if the interned strings have different values. public static bool operator!=(InternedString a, InternedString b) { return !a.Equals(b); } + /// Returns true if the interned string equals the given plain string. public static bool operator==(InternedString a, string b) { return string.Compare(a.m_StringLowerCase, b, StringComparison.InvariantCultureIgnoreCase) == 0; } + /// Returns true if the interned string does not equal the given plain string. public static bool operator!=(InternedString a, string b) { return string.Compare(a.m_StringLowerCase, b, StringComparison.InvariantCultureIgnoreCase) != 0; } + /// Returns true if the given plain string equals the interned string. public static bool operator==(string a, InternedString b) { return string.Compare(a, b.m_StringLowerCase, StringComparison.InvariantCultureIgnoreCase) == 0; } + /// Returns true if the given plain string does not equal the interned string. public static bool operator!=(string a, InternedString b) { return string.Compare(a, b.m_StringLowerCase, StringComparison.InvariantCultureIgnoreCase) != 0; } + /// Returns true if this interned string is lexicographically less than the other. public static bool operator<(InternedString left, InternedString right) { return string.Compare(left.m_StringLowerCase, right.m_StringLowerCase, StringComparison.InvariantCultureIgnoreCase) < 0; } + /// Returns true if this interned string is lexicographically greater than the other. public static bool operator>(InternedString left, InternedString right) { return string.Compare(left.m_StringLowerCase, right.m_StringLowerCase, diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/NameAndParameters.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/NameAndParameters.cs index b4491e8eec..42c17b0f07 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/NameAndParameters.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/NameAndParameters.cs @@ -16,9 +16,12 @@ namespace UnityEngine.InputSystem.Utilities /// public struct NameAndParameters { + /// The name portion of the name-and-parameters string. public string name { get; set; } + /// The parsed parameters associated with the name. public ReadOnlyArray parameters { get; set; } + /// Returns the full name-and-parameters string. public override string ToString() { if (parameters.Count == 0) @@ -44,6 +47,7 @@ internal static NameAndParameters Create(string name, IList paramete }; } + /// Parses a comma-separated list of name-and-parameters strings and returns them as a sequence. public static IEnumerable ParseMultiple(string text) { List list = null; @@ -80,6 +84,7 @@ internal static string ParseName(string text) return ParseNameAndParameters(text, ref index, true).name; } + /// Parses a single name-and-parameters string. public static NameAndParameters Parse(string text) { if (text == null) diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/NamedValue.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/NamedValue.cs index e8eac77240..a8d11d048c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/NamedValue.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/NamedValue.cs @@ -9,6 +9,7 @@ namespace UnityEngine.InputSystem.Utilities /// public struct NamedValue : IEquatable { + /// The separator character used between name and value in a named value string. public const string Separator = ","; /// @@ -21,8 +22,10 @@ public struct NamedValue : IEquatable /// public PrimitiveValue value { get; set; } + /// The of the value stored in this named value. public TypeCode type => value.type; + /// Returns a copy of this named value with the value converted to the given type. public NamedValue ConvertTo(TypeCode type) { return new NamedValue @@ -32,6 +35,7 @@ public NamedValue ConvertTo(TypeCode type) }; } + /// Creates a from the given name and typed value. public static NamedValue From(string name, TValue value) where TValue : struct { @@ -42,17 +46,20 @@ public static NamedValue From(string name, TValue value) }; } + /// Returns a string representation of this named value. public override string ToString() { return $"{name}={value}"; } + /// Returns true if this named value is equal to the given one. public bool Equals(NamedValue other) { return string.Equals(name, other.name, StringComparison.InvariantCultureIgnoreCase) && value == other.value; } + /// Returns true if the given object is a equal to this one. public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) @@ -60,6 +67,7 @@ public override bool Equals(object obj) return obj is NamedValue parameterValue && Equals(parameterValue); } + /// Returns a hash code for this named value. public override int GetHashCode() { unchecked @@ -70,16 +78,19 @@ public override int GetHashCode() } } + /// Returns true if both named values are equal. public static bool operator==(NamedValue left, NamedValue right) { return left.Equals(right); } + /// Returns true if the two named values are not equal. public static bool operator!=(NamedValue left, NamedValue right) { return !left.Equals(right); } + /// Parses a comma-separated list of named value strings and returns them as an array. public static NamedValue[] ParseMultiple(string parameterString) { if (parameterString == null) @@ -102,6 +113,7 @@ public static NamedValue[] ParseMultiple(string parameterString) return parameters; } + /// Parses a single named value string. public static NamedValue Parse(string str) { var index = 0; @@ -163,6 +175,7 @@ private static NamedValue ParseParameter(string parameterString, ref int index) return parameter; } + /// Applies this named value to the property or field with the matching name on the given object. public void ApplyToObject(object instance) { if (instance == null) @@ -182,6 +195,7 @@ public void ApplyToObject(object instance) field.SetValue(instance, value.ConvertTo(fieldTypeCode).ToObject()); } + /// Applies all named values in the given list to the matching properties or fields on the given object. public static void ApplyAllToObject(object instance, TParameterList parameters) where TParameterList : IEnumerable { diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/PrimitiveValue.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/PrimitiveValue.cs index 2f8627b456..1c09b3b71c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/PrimitiveValue.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/PrimitiveValue.cs @@ -790,6 +790,7 @@ public static PrimitiveValue From(TValue value) /// enum type, the PrimitiveValue will hold a value of the enum's underlying /// type (i.e. Type.GetEnumUnderlyingType). /// No conversion exists from the type of . + /// A wrapping the given object's value. public static PrimitiveValue FromObject(object value) { if (value == null) diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/ReadOnlyArray.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/ReadOnlyArray.cs index cb43d947c6..d965b0feb1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/ReadOnlyArray.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/ReadOnlyArray.cs @@ -96,11 +96,8 @@ public int IndexOf(Predicate predicate) /// /// Returns an enumerator that iterates through the read-only array. - /// - /// - /// An enumerator for the read-only array. - /// /// + /// An enumerator over the elements of this array. public Enumerator GetEnumerator() { return new Enumerator(m_Array, m_StartIndex, m_Length); @@ -122,6 +119,7 @@ IEnumerator IEnumerable.GetEnumerator() /// Constructs a read-only array containing elements . /// /// An existing array containing elements to be wrapped as a read-only array. + /// A wrapping the given array. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "`ToXXX` message only really makes sense as static, which is not recommended for generic types.")] public static implicit operator ReadOnlyArray(TValue[] array) { diff --git a/Packages/com.unity.inputsystem/Tests/IntegrationTests/IntegrationTests.cs b/Packages/com.unity.inputsystem/Tests/IntegrationTests/IntegrationTests.cs index 8d45a2e76e..7739bf2f2a 100644 --- a/Packages/com.unity.inputsystem/Tests/IntegrationTests/IntegrationTests.cs +++ b/Packages/com.unity.inputsystem/Tests/IntegrationTests/IntegrationTests.cs @@ -28,8 +28,10 @@ // // NOTE: The tests here are necessary to pass the requirement imposed by upm-ci that a package MUST have tests in it. +/// Integration tests that verify end-to-end input system behavior including remote input. public class IntegrationTests { + /// Prevents methods referenced only by reflection from being stripped by the linker. [Preserve] public static void PreserveMethods() { @@ -68,6 +70,7 @@ public static void PreserveMethods() var dummy = new System.ComponentModel.StringConverter(); } + /// Sets up the test fixture before each test. [SetUp] public virtual void Setup() { @@ -78,12 +81,14 @@ public virtual void Setup() InputSystem.settings.backgroundBehavior = InputSettings.BackgroundBehavior.IgnoreFocus; } + /// Tears down the test fixture after each test. [TearDown] public virtual void TearDown() { InputSystem.settings.backgroundBehavior = default; } + /// Verifies that input events can be sent and received correctly end-to-end. [Test] [Category("Integration")] public void Integration_CanSendAndReceiveEvents() diff --git a/Packages/com.unity.inputsystem/Tests/TestFixture/InputTestFixture.cs b/Packages/com.unity.inputsystem/Tests/TestFixture/InputTestFixture.cs index 810b94b38e..d03ed5114e 100644 --- a/Packages/com.unity.inputsystem/Tests/TestFixture/InputTestFixture.cs +++ b/Packages/com.unity.inputsystem/Tests/TestFixture/InputTestFixture.cs @@ -284,6 +284,7 @@ private void OnPlayModeStateChange(PlayModeStateChange change) #endif + /// Asserts that pressing the given button controls sends the expected state update to the given device. // ReSharper disable once MemberCanBeProtected.Global public static void AssertButtonPress(InputDevice device, TState state, params ButtonControl[] buttons) where TState : struct, IInputStateTypeInfo @@ -308,6 +309,7 @@ public static void AssertButtonPress(InputDevice device, TState state, p } } + /// Asserts that the given stick control reports the expected values for up, down, left, and right directions. public static void AssertStickValues(StickControl stick, Vector2 stickValue, float up, float down, float left, float right) { @@ -422,39 +424,46 @@ internal unsafe void SetCanRunInBackground(InputDevice device, bool canRunInBack }); } + /// Returns a constraint that asserts the action started with the given control, time, and value. public ActionConstraint Started(InputAction action, InputControl control = null, double? time = null, object value = null) { return new ActionConstraint(InputActionPhase.Started, action, control, time: time, duration: 0, value: value); } + /// Returns a constraint that asserts the action started with the given typed control and value. public ActionConstraint Started(InputAction action, InputControl control, TValue value, double? time = null) where TValue : struct { return new ActionConstraint(InputActionPhase.Started, action, control, value, time: time, duration: 0); } + /// Returns a constraint that asserts the action was performed with the given control, times, and value. public ActionConstraint Performed(InputAction action, InputControl control = null, double? time = null, double? duration = null, object value = null) { return new ActionConstraint(InputActionPhase.Performed, action, control, time: time, duration: duration, value: value); } + /// Returns a constraint that asserts the action was performed with the given typed control and value. public ActionConstraint Performed(InputAction action, InputControl control, TValue value, double? time = null, double? duration = null) where TValue : struct { return new ActionConstraint(InputActionPhase.Performed, action, control, value, time: time, duration: duration); } + /// Returns a constraint that asserts the action was canceled with the given control, times, and value. public ActionConstraint Canceled(InputAction action, InputControl control = null, double? time = null, double? duration = null, object value = null) { return new ActionConstraint(InputActionPhase.Canceled, action, control, time: time, duration: duration, value: value); } + /// Returns a constraint that asserts the action was canceled with the given typed control and value. public ActionConstraint Canceled(InputAction action, InputControl control, TValue value, double? time = null, double? duration = null) where TValue : struct { return new ActionConstraint(InputActionPhase.Canceled, action, control, value, time: time, duration: duration); } + /// Returns a constraint that asserts the action started with the given control and value (alternate overload). public ActionConstraint Started(InputAction action, InputControl control = null, object value = null, double? time = null) where TInteraction : IInputInteraction { @@ -462,6 +471,7 @@ public ActionConstraint Started(InputAction action, InputControl c duration: 0, value: value); } + /// Returns a constraint that asserts the action was performed with the given control and value (alternate overload). public ActionConstraint Performed(InputAction action, InputControl control = null, object value = null, double? time = null, double? duration = null) where TInteraction : IInputInteraction { @@ -469,6 +479,7 @@ public ActionConstraint Performed(InputAction action, InputControl duration: duration, value: value); } + /// Returns a constraint that asserts the action was canceled with the given control and value (alternate overload). public ActionConstraint Canceled(InputAction action, InputControl control = null, object value = null, double? time = null, double? duration = null) where TInteraction : IInputInteraction { @@ -478,18 +489,21 @@ public ActionConstraint Canceled(InputAction action, InputControl ////REVIEW: Should we determine queueEventOnly automatically from whether we're in a UnityTest? + /// Simulates pressing the given button control with optional time and queue control. // ReSharper disable once MemberCanBeProtected.Global public void Press(ButtonControl button, double time = -1, double timeOffset = 0, bool queueEventOnly = false) { Set(button, 1, time, timeOffset, queueEventOnly: queueEventOnly); } + /// Simulates releasing the given button control with optional time and queue control. // ReSharper disable once MemberCanBeProtected.Global public void Release(ButtonControl button, double time = -1, double timeOffset = 0, bool queueEventOnly = false) { Set(button, 0, time, timeOffset, queueEventOnly: queueEventOnly); } + /// Simulates pressing and immediately releasing the given button control. // ReSharper disable once MemberCanBePrivate.Global public void PressAndRelease(ButtonControl button, double time = -1, double timeOffset = 0, bool queueEventOnly = false) { @@ -497,6 +511,7 @@ public void PressAndRelease(ButtonControl button, double time = -1, double timeO Release(button, time, timeOffset, queueEventOnly: queueEventOnly); } + /// Simulates a click (press and release) on the given button control. // ReSharper disable once MemberCanBeProtected.Global public void Click(ButtonControl button, double time = -1, double timeOffset = 0, bool queueEventOnly = false) { @@ -613,6 +628,7 @@ void SetUpAndQueueEvent(InputEventPtr eventPtr) InputSystem.Update(); } + /// Simulates moving the given 2D control to the specified position. public void Move(InputControl positionControl, Vector2 position, Vector2? delta = null, double time = -1, double timeOffset = 0, bool queueEventOnly = false) { Set(positionControl, position, time: time, timeOffset: timeOffset, queueEventOnly: true); @@ -625,6 +641,7 @@ public void Move(InputControl positionControl, Vector2 position, Vector InputSystem.Update(); } + /// Begins a simulated touch with the given ID and position. ////TODO: obsolete this one in 2.0 and use pressure=1 default value public void BeginTouch(int touchId, Vector2 position, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0, byte displayIndex = 0) @@ -632,12 +649,14 @@ public void BeginTouch(int touchId, Vector2 position, bool queueEventOnly = fals SetTouch(touchId, TouchPhase.Began, position, 1, queueEventOnly: queueEventOnly, screen: screen, time: time, timeOffset: timeOffset, displayIndex: displayIndex); } + /// Begins a simulated touch with the given ID, position, and pressure. public void BeginTouch(int touchId, Vector2 position, float pressure, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0) { SetTouch(touchId, TouchPhase.Began, position, pressure, queueEventOnly: queueEventOnly, screen: screen, time: time, timeOffset: timeOffset); } + /// Moves a simulated touch to the given position. ////TODO: obsolete this one in 2.0 and use pressure=1 default value public void MoveTouch(int touchId, Vector2 position, Vector2 delta = default, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0) @@ -645,12 +664,14 @@ public void MoveTouch(int touchId, Vector2 position, Vector2 delta = default, bo SetTouch(touchId, TouchPhase.Moved, position, 1, delta, queueEventOnly: queueEventOnly, screen: screen, time: time, timeOffset: timeOffset); } + /// Moves a simulated touch to the given position with the specified pressure. public void MoveTouch(int touchId, Vector2 position, float pressure, Vector2 delta = default, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0) { SetTouch(touchId, TouchPhase.Moved, position, pressure, delta, queueEventOnly, screen: screen, time: time, timeOffset: timeOffset); } + /// Ends a simulated touch at the given position. ////TODO: obsolete this one in 2.0 and use pressure=1 default value public void EndTouch(int touchId, Vector2 position, Vector2 delta = default, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0, byte displayIndex = 0) @@ -658,12 +679,14 @@ public void EndTouch(int touchId, Vector2 position, Vector2 delta = default, boo SetTouch(touchId, TouchPhase.Ended, position, 1, delta, queueEventOnly: queueEventOnly, screen: screen, time: time, timeOffset: timeOffset, displayIndex: displayIndex); } + /// Ends a simulated touch at the given position with the specified pressure. public void EndTouch(int touchId, Vector2 position, float pressure, Vector2 delta = default, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0) { SetTouch(touchId, TouchPhase.Ended, position, pressure, delta, queueEventOnly, screen: screen, time: time, timeOffset: timeOffset); } + /// Cancels a simulated touch. ////TODO: obsolete this one in 2.0 and use pressure=1 default value public void CancelTouch(int touchId, Vector2 position, Vector2 delta = default, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0) @@ -671,12 +694,14 @@ public void CancelTouch(int touchId, Vector2 position, Vector2 delta = default, SetTouch(touchId, TouchPhase.Canceled, position, delta, queueEventOnly: queueEventOnly, screen: screen, time: time, timeOffset: timeOffset); } + /// Cancels a simulated touch with the specified pressure. public void CancelTouch(int touchId, Vector2 position, float pressure, Vector2 delta = default, bool queueEventOnly = false, Touchscreen screen = null, double time = -1, double timeOffset = 0) { SetTouch(touchId, TouchPhase.Canceled, position, pressure, delta, queueEventOnly, screen: screen, time: time, timeOffset: timeOffset); } + /// Sets the state of a simulated touch to the given phase and position. ////TODO: obsolete this one in 2.0 and use pressure=1 default value public void SetTouch(int touchId, TouchPhase phase, Vector2 position, Vector2 delta = default, bool queueEventOnly = true, Touchscreen screen = null, double time = -1, double timeOffset = 0) @@ -685,6 +710,7 @@ public void SetTouch(int touchId, TouchPhase phase, Vector2 position, Vector2 de timeOffset: timeOffset); } + /// Sets the state of a simulated touch with full control over phase, position, pressure, and flags. public void SetTouch(int touchId, TouchPhase phase, Vector2 position, float pressure, Vector2 delta = default, bool queueEventOnly = true, Touchscreen screen = null, double time = -1, double timeOffset = 0, byte displayIndex = 0) { @@ -709,6 +735,7 @@ public void SetTouch(int touchId, TouchPhase phase, Vector2 position, float pres InputSystem.Update(); } + /// Triggers the given action as if the given control was activated with the specified value. public void Trigger(InputAction action, InputControl control, TValue value) where TValue : struct { @@ -887,18 +914,27 @@ internal float unscaledGameTime } } + /// An NUnit constraint that verifies an callback occurred with the expected parameters. public class ActionConstraint : Constraint { + /// The action phase this constraint checks for. public InputActionPhase phase { get; set; } + /// The expected action start time, or null to skip the check. public double? time { get; set; } + /// The expected action duration, or null to skip the check. public double? duration { get; set; } + /// The action being checked. public InputAction action { get; set; } + /// The expected control that triggered the action. public InputControl control { get; set; } + /// The expected value reported by the action. public object value { get; set; } + /// The expected interaction type, or null to skip the check. public Type interaction { get; set; } private readonly List m_AndThen = new List(); + /// Initializes the constraint with the given expected action phase, control, value, and optional timing. public ActionConstraint(InputActionPhase phase, InputAction action, InputControl control, object value = null, Type interaction = null, double? time = null, double? duration = null) { this.phase = phase; @@ -930,6 +966,7 @@ public ActionConstraint(InputActionPhase phase, InputAction action, InputControl Description = description; } + /// Evaluates the constraint against the given action trace or callback list. public override ConstraintResult ApplyTo(object actual) { var trace = (InputActionTrace)actual; @@ -1011,6 +1048,7 @@ private bool Verify(InputActionTrace.ActionEventPtr eventPtr) return true; } + /// Chains this constraint with another, requiring both to match in sequence. public ActionConstraint AndThen(ActionConstraint constraint) { m_AndThen.Add(constraint);