diff --git a/Packages/com.unity.inputsystem/Documentation~/Actions.md b/Packages/com.unity.inputsystem/Documentation~/Actions.md index 778266df3a..50ef40f400 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Actions.md +++ b/Packages/com.unity.inputsystem/Documentation~/Actions.md @@ -34,7 +34,7 @@ Here are several important APIs you can use to script with actions in the Input |[`InputAction`](xref:UnityEngine.InputSystem.InputAction)|A named action that can return the current value of the controls that it is bound to, or can trigger callbacks in response to input. This is the API equivalent to an entry in the "Actions" panel of the [Input Actions Editor](xref:input-system-configuring-input).| |[`InputBinding`](xref:UnityEngine.InputSystem.InputBinding)|The relationship between an action and the specific device controls for which it receives input. For more information about Bindings and how to use them, refer to [Input Bindings](xref:input-system-action-bindings).| -Each action has a name ([`InputAction.name`](xref:UnityEngine.InputSystem.InputAction.name)), which must be unique within the action map that the action belongs to, if any (see [`InputAction.actionMap`](xref:UnityEngine.InputSystem.InputAction.actionMap)). Each action also has a unique ID ([`InputAction.id`](xref:UnityEngine.InputSystem.InputAction.id)), which you can use to reference the action. The ID remains the same even if you rename the action. +Each action has a name ([`InputAction.name`](xref:UnityEngine.InputSystem.InputAction.name)), which must be unique within the action map that the action belongs to, if any (refer to [`InputAction.actionMap`](xref:UnityEngine.InputSystem.InputAction.actionMap)). Each action also has a unique ID ([`InputAction.id`](xref:UnityEngine.InputSystem.InputAction.id)), which you can use to reference the action. The ID remains the same even if you rename the action. Each action map has a name ([`InputActionMap.name`](xref:UnityEngine.InputSystem.InputActionMap.name)), which must also be unique with respect to the other action maps present, if any. Each action map also has a unique ID ([`InputActionMap.id`](xref:UnityEngine.InputSystem.InputActionMap.id)), which you can use to reference the action map. The ID remains the same even if you rename the action map. diff --git a/Packages/com.unity.inputsystem/Documentation~/Installation.md b/Packages/com.unity.inputsystem/Documentation~/Installation.md index 188d6e035b..f3b485e31a 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Installation.md +++ b/Packages/com.unity.inputsystem/Documentation~/Installation.md @@ -45,8 +45,8 @@ When the new input backends are enabled, the `ENABLE_INPUT_SYSTEM=1` C# `#define ## Install samples -The Input System package comes with a number of samples. You can install these directly from the Package Manager window in Unity (__Window > Package Manager__). To see the list of samples, select the Input System package in the Package Manager window and click the __Samples__ tab. Then click __Import__ next to any sample name to import it into the current Project. +The Input System package comes with a number of samples. You can install these directly from the Package Manager window in Unity (__Window > Package Manager__). To refer to the list of samples, select the Input System package in the Package Manager window and click the __Samples__ tab. Then click __Import__ next to any sample name to import it into the current Project. ![Install Samples](Images/InstallSamples.png) -For a more comprehensive demo project for the Input System, see the [InputSystem_Warriors](https://github.com/UnityTechnologies/InputSystem_Warriors) GitHub repository. +For a more comprehensive demo project for the Input System, refer to the [InputSystem_Warriors](https://github.com/UnityTechnologies/InputSystem_Warriors) GitHub repository. diff --git a/Packages/com.unity.inputsystem/Documentation~/Joystick.md b/Packages/com.unity.inputsystem/Documentation~/Joystick.md index f0d8c9ed37..57edda940a 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Joystick.md +++ b/Packages/com.unity.inputsystem/Documentation~/Joystick.md @@ -5,7 +5,7 @@ uid: input-system-joystick The Input System currently has limited support for joysticks as generic [HIDs](xref:input-system-hid) only. The system attempts to identify Controls based on the information provided in the HID descriptor of the Device, but it might not always be accurate. These Devices often work best when you allow the user to [manually remap the Controls](xref:UnityEngine.InputSystem.InputActionRebindingExtensions). -To better support specific joysticks Devices, you can also [provide your own custom mappings for those Devices](xref:input-system-hid#creating-a-custom-device-layout). Unity might extend the Input System to include some mappings for common devices in the future. See the [manual page on HID](xref:input-system-hid) for more information. +To better support specific joysticks Devices, you can also [provide your own custom mappings for those Devices](xref:input-system-hid#creating-a-custom-device-layout). Unity might extend the Input System to include some mappings for common devices in the future. Refer to the [manual page on HID](xref:input-system-hid) for more information. ## Controls diff --git a/Packages/com.unity.inputsystem/Documentation~/Migration.md b/Packages/com.unity.inputsystem/Documentation~/Migration.md index 883ff37a07..63b97324c6 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Migration.md +++ b/Packages/com.unity.inputsystem/Documentation~/Migration.md @@ -93,7 +93,7 @@ Directly reading hardware controls bypasses the new Input System's action-based [`Input.anyKeyDown`](https://docs.unity3d.com/ScriptReference/Input-anyKeyDown.html)|Use [`Keyboard.current.anyKey.wasUpdatedThisFrame`](xref:UnityEngine.InputSystem.Keyboard.anyKey) [`Input.compositionCursorPos`](https://docs.unity3d.com/ScriptReference/Input-compositionCursorPos.html)|Use [`Keyboard.current.SetIMECursorPosition(myPosition)`](xref:UnityEngine.InputSystem.Keyboard.SetIMECursorPosition(UnityEngine.Vector2)) [`Input.compositionString`](https://docs.unity3d.com/ScriptReference/Input-compositionString.html)|Subscribe to the [`Keyboard.onIMECompositionChange`](xref:UnityEngine.InputSystem.Keyboard.onIMECompositionChange). -[`Input.imeCompositionMode`](https://docs.unity3d.com/ScriptReference/Input-imeCompositionMode.html)|Use: [`Keyboard.current.SetIMEEnabled(true)`](xref:UnityEngine.InputSystem.Keyboard.SetIMEEnabled(System.Boolean))
Also see: [Keyboard text input documentation](Keyboard.html#ime). +[`Input.imeCompositionMode`](https://docs.unity3d.com/ScriptReference/Input-imeCompositionMode.html)|Use: [`Keyboard.current.SetIMEEnabled(true)`](xref:UnityEngine.InputSystem.Keyboard.SetIMEEnabled(System.Boolean))
Also refer to: [Keyboard text input documentation](Keyboard.html#ime). [`Input.imeIsSelected`](https://docs.unity3d.com/ScriptReference/Input-imeIsSelected.html)|Use: [`Keyboard.current.imeSelected`](xref:UnityEngine.InputSystem.Keyboard.imeSelected) [`Input.inputString`](https://docs.unity3d.com/ScriptReference/Input-inputString.html)|Subscribe to the [`Keyboard.onTextInput`](xref:UnityEngine.InputSystem.Keyboard.onTextInput) event:
`Keyboard.current.onTextInput += character => /* ... */;` @@ -122,7 +122,7 @@ Directly reading hardware controls bypasses the new Input System's action-based [`Input.touchPressureSupported`](https://docs.unity3d.com/ScriptReference/Input-touchPressureSupported.html)|No corresponding API yet. [`Input.touchSupported`](https://docs.unity3d.com/ScriptReference/Input-touchSupported.html)|[`Touchscreen.current != null`](xref:UnityEngine.InputSystem.Touchscreen.current) [`Input.backButtonLeavesApp`](https://docs.unity3d.com/ScriptReference/Input-backButtonLeavesApp.html)|No corresponding API yet. -[`GetPenEvent`](https://docs.unity3d.com/ScriptReference/Input.GetPenEvent.html)
[`GetLastPenContactEvent`](https://docs.unity3d.com/ScriptReference/Input.GetLastPenContactEvent.html)
[`ResetPenEvents`](https://docs.unity3d.com/ScriptReference/Input.ResetPenEvents.html)
[`ClearLastPenContactEvent`](https://docs.unity3d.com/ScriptReference/Input.ClearLastPenContactEvent.html)|Use: [`Pen.current`](xref:UnityEngine.InputSystem.Pen.current)
See the [Pen, tablet and stylus support](xref:input-system-pen) docs for more information. +[`GetPenEvent`](https://docs.unity3d.com/ScriptReference/Input.GetPenEvent.html)
[`GetLastPenContactEvent`](https://docs.unity3d.com/ScriptReference/Input.GetLastPenContactEvent.html)
[`ResetPenEvents`](https://docs.unity3d.com/ScriptReference/Input.ResetPenEvents.html)
[`ClearLastPenContactEvent`](https://docs.unity3d.com/ScriptReference/Input.ClearLastPenContactEvent.html)|Use: [`Pen.current`](xref:UnityEngine.InputSystem.Pen.current)
Refer to the [Pen, tablet and stylus support](xref:input-system-pen) docs for more information.
@@ -134,17 +134,17 @@ Directly reading hardware controls bypasses the new Input System's action-based |Input Manager (Old)|Input System (New)| |--|--| [`Input.acceleration`](https://docs.unity3d.com/ScriptReference/Input-acceleration.html)|[`Accelerometer.current.acceleration.ReadValue()`](xref:UnityEngine.InputSystem.Accelerometer). -[`Input.accelerationEventCount`](https://docs.unity3d.com/ScriptReference/Input-accelerationEventCount.html)
[`Input.accelerationEvents`](https://docs.unity3d.com/ScriptReference/Input-accelerationEvents.html)|Acceleration events aren't made available separately from other input events. See the [accelerometer code sample on the Sensors page](Sensors.html#accelerometer). +[`Input.accelerationEventCount`](https://docs.unity3d.com/ScriptReference/Input-accelerationEventCount.html)
[`Input.accelerationEvents`](https://docs.unity3d.com/ScriptReference/Input-accelerationEvents.html)|Acceleration events aren't made available separately from other input events. Refer to the [accelerometer code sample on the Sensors page](Sensors.html#accelerometer). [`Input.compass`](https://docs.unity3d.com/ScriptReference/Input-compass.html)|No corresponding API yet. [`Input.compensateSensors`](https://docs.unity3d.com/ScriptReference/Input-compensateSensors.html)|[`InputSettings.compensateForScreenOrientation`](xref:UnityEngine.InputSystem.InputSettings.compensateForScreenOrientation). [`Input.deviceOrientation`](https://docs.unity3d.com/ScriptReference/Input-deviceOrientation.html)|No corresponding API yet. [`Input.gyro`](https://docs.unity3d.com/ScriptReference/Input-gyro.html)|The `UnityEngine.Gyroscope` class is replaced by multiple separate sensor Devices in the new Input System:
[`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) to measure angular velocity.
[`GravitySensor`](xref:UnityEngine.InputSystem.GravitySensor) to measure the direction of gravity.
[`AttitudeSensor`](xref:UnityEngine.InputSystem.AttitudeSensor) to measure the orientation of the device.
[`Accelerometer`](xref:UnityEngine.InputSystem.Accelerometer) to measure the total acceleration applied to the device.
[`LinearAccelerationSensor`](xref:UnityEngine.InputSystem.LinearAccelerationSensor) to measure acceleration applied to the device, compensating for gravity. [`Input.gyro.attitude`](https://docs.unity3d.com/ScriptReference/Gyroscope-attitude.html)|[`AttitudeSensor.current.orientation.ReadValue()`](xref:UnityEngine.InputSystem.AttitudeSensor). -[`Input.gyro.enabled`](https://docs.unity3d.com/ScriptReference/Gyroscope-enabled.html)|Get: `Gyroscope.current.enabled`
Set:
`EnableDevice(Gyroscope.current);`
`DisableDevice(Gyroscope.current);`

__Note__: The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. See the notes for `Input.gyro` above for details. +[`Input.gyro.enabled`](https://docs.unity3d.com/ScriptReference/Gyroscope-enabled.html)|Get: `Gyroscope.current.enabled`
Set:
`EnableDevice(Gyroscope.current);`
`DisableDevice(Gyroscope.current);`

__Note__: The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. Refer to the notes for `Input.gyro` above for details. [`Input.gyro.gravity`](https://docs.unity3d.com/ScriptReference/Gyroscope-gravity.html)|[`GravitySensor.current.gravity.ReadValue()`](xref:UnityEngine.InputSystem.GravitySensor) [`Input.gyro.rotationRate`](https://docs.unity3d.com/ScriptReference/Gyroscope-rotationRate.html)|[`Gyroscope.current.angularVelocity.ReadValue()`](xref:UnityEngine.InputSystem.Gyroscope). [`Input.gyro.rotationRateUnbiased`](https://docs.unity3d.com/ScriptReference/Gyroscope-rotationRateUnbiased.html)|No corresponding API yet. -[`Input.gyro.updateInterval`](https://docs.unity3d.com/ScriptReference/Gyroscope-updateInterval.html)|[`Sensor.samplingFrequency`](xref:UnityEngine.InputSystem.Sensor.samplingFrequency)
Example:
`Gyroscope.current.samplingFrequency = 1.0f / updateInterval;`

__Notes__:
[`samplingFrequency`](xref:UnityEngine.InputSystem.Sensor.samplingFrequency) is in Hz, not in seconds as [`updateInterval`](https://docs.unity3d.com/ScriptReference/Gyroscope-updateInterval.html), so you need to divide 1 by the value.

The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. See the notes for `Input.gyro` above for details. +[`Input.gyro.updateInterval`](https://docs.unity3d.com/ScriptReference/Gyroscope-updateInterval.html)|[`Sensor.samplingFrequency`](xref:UnityEngine.InputSystem.Sensor.samplingFrequency)
Example:
`Gyroscope.current.samplingFrequency = 1.0f / updateInterval;`

__Notes__:
[`samplingFrequency`](xref:UnityEngine.InputSystem.Sensor.samplingFrequency) is in Hz, not in seconds as [`updateInterval`](https://docs.unity3d.com/ScriptReference/Gyroscope-updateInterval.html), so you need to divide 1 by the value.

The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. Refer to the notes for `Input.gyro` above for details. [`Input.gyro.userAcceleration`](https://docs.unity3d.com/ScriptReference/Gyroscope-userAcceleration.html)|[`LinearAccelerationSensor.current.acceleration.ReadValue()`](xref:UnityEngine.InputSystem.LinearAccelerationSensor) [`Input.location`](https://docs.unity3d.com/ScriptReference/Input-location.html)|No corresponding API yet. -[`Input.GetAccelerationEvent`](https://docs.unity3d.com/ScriptReference/Input.GetAccelerationEvent.html)|See notes for `Input.accelerationEvents` above. +[`Input.GetAccelerationEvent`](https://docs.unity3d.com/ScriptReference/Input.GetAccelerationEvent.html)|Refer to notes for `Input.accelerationEvents` above. diff --git a/Packages/com.unity.inputsystem/Documentation~/Mouse.md b/Packages/com.unity.inputsystem/Documentation~/Mouse.md index 78ffa96b88..d57eabefd0 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Mouse.md +++ b/Packages/com.unity.inputsystem/Documentation~/Mouse.md @@ -32,7 +32,7 @@ In addition to the [Controls inherited from `Pointer`](xref:input-system-pointer ## Cursor warping -On desktop platforms (Windows, Mac, Linux, and UWP), you can move the mouse cursor via code. Note that this moves the system's actual mouse cursor, not just Unity's internally-stored mouse position. This means that the user sees the cursor jumping to a different position, which is generally considered to be bad UX practice. It's advisable to only do this if the cursor is hidden (see the [`Cursor` API documentation](https://docs.unity3d.com/ScriptReference/Cursor.html) for more information). +On desktop platforms (Windows, Mac, Linux, and UWP), you can move the mouse cursor via code. Note that this moves the system's actual mouse cursor, not just Unity's internally-stored mouse position. This means that the user sees the cursor jumping to a different position, which is generally considered to be bad UX practice. It's advisable to only do this if the cursor is hidden (refer to the [`Cursor` API documentation](https://docs.unity3d.com/ScriptReference/Cursor.html) for more information). To move the cursor to a different position, use [`Mouse.WarpCursorPosition`](xref:UnityEngine.InputSystem.Mouse.WarpCursorPosition(UnityEngine.Vector2)). The coordinates are expressed as Unity screen coordinates, just like [`Mouse.position`](xref:UnityEngine.InputSystem.Pointer.position). diff --git a/Packages/com.unity.inputsystem/Documentation~/OnScreen.md b/Packages/com.unity.inputsystem/Documentation~/OnScreen.md index 5b448e6d66..f48c95a4e4 100644 --- a/Packages/com.unity.inputsystem/Documentation~/OnScreen.md +++ b/Packages/com.unity.inputsystem/Documentation~/OnScreen.md @@ -5,7 +5,7 @@ uid: input-system-on-screen You can use on-screen Controls to simulate Input Devices with UI widgets that the user interacts with on the screen. The most prominent example is the use of stick and button widgets on touchscreens to emulate a joystick or gamepad. -There are currently two Control types implemented out of the box: [buttons](#on-screen-buttons) and [sticks](#on-screen-sticks). You can implement custom Controls by extending the base [`OnScreenControl`](xref:UnityEngine.InputSystem.OnScreen.OnScreenControl) class (see documentation on [writing custom on screen Controls](#writing-custom-on-screen-controls) to learn more). +There are currently two Control types implemented out of the box: [buttons](#on-screen-buttons) and [sticks](#on-screen-sticks). You can implement custom Controls by extending the base [`OnScreenControl`](xref:UnityEngine.InputSystem.OnScreen.OnScreenControl) class (refer to documentation on [writing custom on screen Controls](#writing-custom-on-screen-controls) to learn more). > [!NOTE] > On-screen Controls don't have a predefined visual representation. It's up to you to set up the visual aspect of a Control (for example, by adding a sprite or UI component to the GameObject). On-screen Controls take care of the interaction logic and of setting up and generating input from interactions. diff --git a/Packages/com.unity.inputsystem/Documentation~/PlayerInput.md b/Packages/com.unity.inputsystem/Documentation~/PlayerInput.md index 0fce298a83..fb6adecc74 100644 --- a/Packages/com.unity.inputsystem/Documentation~/PlayerInput.md +++ b/Packages/com.unity.inputsystem/Documentation~/PlayerInput.md @@ -40,7 +40,7 @@ To get started using the Player Input component, use the following steps: 2. Assign your [Action Asset](xref:input-system-action-assets) to the **Actions** field. This is usually the default project-wide action asset named "InputSystem_Actions" > [!NOTE] > Currently, when using project-wide actions all the action maps are enabled by default. It is advisible to manually disable them and manually enable the default map that **Player Input** during `Start()`. -3. Set up Action responses, by selecting a **Behavior** type from the Behavior menu. The Behavior type you select affects how you should implement the methods that handle your Action responses. See the [notification behaviors](#notification-behaviors) section further down for details.

![PlayerInput Notification Behavior](Images/PlayerInputNotificationBehaviors.png)

+3. Set up Action responses, by selecting a **Behavior** type from the Behavior menu. The Behavior type you select affects how you should implement the methods that handle your Action responses. Refer to the [notification behaviors](#notification-behaviors) section further down for details.

![PlayerInput Notification Behavior](Images/PlayerInputNotificationBehaviors.png)

## Configuring the Player Input component @@ -86,7 +86,7 @@ To disable a player's input, call [`PlayerInput.DeactivateInput`](xref:UnityEngi When `PlayerInput` is disabled, it automatically disables the currently active Action Map ([`PlayerInput.currentActionMap`](xref:UnityEngine.InputSystem.PlayerInput.currentActionMap)) and disassociate any Devices paired to the player. -See the [notification behaviors](#notification-behaviors) section below for how to be notified when player triggers an Action. +Refer to the [notification behaviors](#notification-behaviors) section below for how to be notified when player triggers an Action. ### When using **Send Messages** or **Broadcast Messages** diff --git a/Packages/com.unity.inputsystem/Documentation~/PlayerInputManager.md b/Packages/com.unity.inputsystem/Documentation~/PlayerInputManager.md index 179b4a2755..08747b3a6e 100644 --- a/Packages/com.unity.inputsystem/Documentation~/PlayerInputManager.md +++ b/Packages/com.unity.inputsystem/Documentation~/PlayerInputManager.md @@ -13,12 +13,12 @@ The [`Player Input`](xref:input-system-player-input) system facilitates setting |Property|Description| |--------|-----------| |[`Notification Behavior`](xref:UnityEngine.InputSystem.PlayerInputManager.notificationBehavior)|How the [`PlayerInputManager`](xref:UnityEngine.InputSystem.PlayerInput) component notifies game code about changes to the connected players. [This works the same way as for the `PlayerInput` component](xref:input-system-player-input#notification-behaviors).| -|[`Join Behavior`](xref:UnityEngine.InputSystem.PlayerInputManager.joinBehavior)|Determines the mechanism by which players can join when joining is enabled. See documentation on [join behaviors](#join-behaviors).| +|[`Join Behavior`](xref:UnityEngine.InputSystem.PlayerInputManager.joinBehavior)|Determines the mechanism by which players can join when joining is enabled. Refer to documentation on [join behaviors](#join-behaviors).| |[`Player Prefab`](xref:UnityEngine.InputSystem.PlayerInputManager.playerPrefab)|A prefab that represents a player in the game. The [`PlayerInputManager`](xref:UnityEngine.InputSystem.PlayerInputManager) component creates an instance of this prefab whenever a new player joins. This prefab must have one [`PlayerInput`](xref:input-system-player-input) component in its hierarchy.| |[`Joining Enabled By Default`](xref:UnityEngine.InputSystem.PlayerInputManager.joiningEnabled)|While this is enabled, new players can join via the mechanism determined by [`Join Behavior`](xref:UnityEngine.InputSystem.PlayerInputManager.joinBehavior).| |[`Limit Number of Players`](xref:UnityEngine.InputSystem.PlayerInputManager.maxPlayerCount)|Enable this if you want to limit the number of players who can join the game.| |[`Max Player Count`](xref:UnityEngine.InputSystem.PlayerInputManager.maxPlayerCount)(Only shown when `Limit number of Players` is enabled.)|The maximum number of players allowed to join the game.| -|[`Enable Split-Screen`](xref:UnityEngine.InputSystem.PlayerInputManager.splitScreen)|If enabled, each player is automatically assigned a portion of the available screen area. See documentation on [split-screen](#split-screen) multiplayer.| +|[`Enable Split-Screen`](xref:UnityEngine.InputSystem.PlayerInputManager.splitScreen)|If enabled, each player is automatically assigned a portion of the available screen area. Refer to documentation on [split-screen](#split-screen) multiplayer.| ### Join behaviors @@ -42,7 +42,7 @@ If you enable the [`Split-Screen`](xref:UnityEngine.InputSystem.PlayerInputManag |[`Set Fixed Number`](xref:UnityEngine.InputSystem.PlayerInputManager.fixedNumberOfSplitScreens)|If this value is greater than zero, the [`PlayerInputManager`](xref:UnityEngine.InputSystem.PlayerInputManager) always splits the screen into a fixed number of rectangles, regardless of the actual number of players.| |[`Screen Rectangle`](xref:UnityEngine.InputSystem.PlayerInputManager.splitScreenArea)|The normalized screen rectangle available for allocating player split-screens into.| -By default, any player in the game can interact with any UI elements. However, in split-screen setups, your game can have screen-space UIs that are restricted to just one specific camera. See the [UI Input](xref:input-system-player-input#ui-input) section on the Player Input component page on how to set this up using the Player Input component, [`InputSystemUIInputModule`](xref:input-system-ui-support#setting-up-ui-input) and [`MultiplayerEventSystem`](xref:input-system-ui-support#multiplayer-uis) components. +By default, any player in the game can interact with any UI elements. However, in split-screen setups, your game can have screen-space UIs that are restricted to just one specific camera. Refer to the [UI Input](xref:input-system-player-input#ui-input) section on the Player Input component page on how to set this up using the Player Input component, [`InputSystemUIInputModule`](xref:input-system-ui-support#setting-up-ui-input) and [`MultiplayerEventSystem`](xref:input-system-ui-support#multiplayer-uis) components. ### `PlayerInputManager` notifications diff --git a/Packages/com.unity.inputsystem/Documentation~/RespondingToActions.md b/Packages/com.unity.inputsystem/Documentation~/RespondingToActions.md index f9f405b16d..c63b5c4c2a 100644 --- a/Packages/com.unity.inputsystem/Documentation~/RespondingToActions.md +++ b/Packages/com.unity.inputsystem/Documentation~/RespondingToActions.md @@ -292,7 +292,7 @@ When the Action initially enables, it performs an [initial state check](xref:inp #### Button -This is very similar to [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value), but [`Button`](xref:UnityEngine.InputSystem.InputActionType.Button) type Actions can only be bound to [`ButtonControl`](xref:UnityEngine.InputSystem.Controls.ButtonControl) Controls, and don't perform an initial state check like [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value) Actions do (see the Value section above). Use this for inputs that trigger an Action once every time they are pressed. The initial state check is usually not useful in such cases, because it can trigger actions if the button is still held down from a previous press when the Action was enabled. +This is very similar to [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value), but [`Button`](xref:UnityEngine.InputSystem.InputActionType.Button) type Actions can only be bound to [`ButtonControl`](xref:UnityEngine.InputSystem.Controls.ButtonControl) Controls, and don't perform an initial state check like [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value) Actions do (refer to the Value section above). Use this for inputs that trigger an Action once every time they are pressed. The initial state check is usually not useful in such cases, because it can trigger actions if the button is still held down from a previous press when the Action was enabled. #### Pass-Through @@ -300,10 +300,10 @@ This is very similar to [`Value`](xref:UnityEngine.InputSystem.InputActionType.V ### Debugging Actions -To see currently enabled Actions and their bound Controls, use the [Input Debugger](xref:input-system-debugging#debugging-actions). +To refer to currently enabled Actions and their bound Controls, use the [Input Debugger](xref:input-system-debugging#debugging-actions). You can also use the [`InputActionVisualizer`](xref:input-system-debugging#inputactionvisualizer) component from the Visualizers sample to get an on-screen visualization of an Action's value and Interaction state in real-time. ### Using Actions with multiple players -You can use the same Action definitions for multiple local players (for example, in a local co-op game). For more information, see documentation on the [Player Input Manager](xref:input-system-player-input-manager) component. +You can use the same Action definitions for multiple local players (for example, in a local co-op game). For more information, refer to documentation on the [Player Input Manager](xref:input-system-player-input-manager) component. diff --git a/Packages/com.unity.inputsystem/Documentation~/Sensors.md b/Packages/com.unity.inputsystem/Documentation~/Sensors.md index 059412ff99..20b3957c81 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Sensors.md +++ b/Packages/com.unity.inputsystem/Documentation~/Sensors.md @@ -103,7 +103,7 @@ Use the gyroscope to measure the angular velocity of a device. This is useful to ## [`GravitySensor`](xref:UnityEngine.InputSystem.GravitySensor) -Use the gravity sensor to determine the direction of the gravity vector relative to a device. This is useful to control content by device orientation. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of linear acceleration (see `LinearAccelerationSensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. +Use the gravity sensor to determine the direction of the gravity vector relative to a device. This is useful to control content by device orientation. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of linear acceleration (refer to `LinearAccelerationSensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. ## [`AttitudeSensor`](xref:UnityEngine.InputSystem.AttitudeSensor) @@ -133,7 +133,7 @@ if (attitudeSensor != null) ## [`LinearAccelerationSensor`](xref:UnityEngine.InputSystem.LinearAccelerationSensor) -Use the accelerometer to measure the acceleration of a device. This is useful to control content by moving a device around. Linear acceleration is the acceleration of a device unaffected by gravity. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of gravity (see `GravitySensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. +Use the accelerometer to measure the acceleration of a device. This is useful to control content by moving a device around. Linear acceleration is the acceleration of a device unaffected by gravity. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of gravity (refer to `GravitySensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. ## [`MagneticFieldSensor`](xref:UnityEngine.InputSystem.MagneticFieldSensor) diff --git a/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md b/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md index 3f6f0af710..6e3fe9b1b8 100644 --- a/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md +++ b/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md @@ -64,7 +64,7 @@ Support varies between browsers, Devices, and operating systems, and further dif ## Other gamepads, joysticks, and racing wheels -The Input System supports any Device which implements the USB HID specification. However, for Devices which don't have specific [layouts](xref:input-system-layouts) implemented in the Input System, the system can only surface the information available from the HID descriptor of the Device, which limits how precisely it can describe a control. These Devices often work best when allowing the user to [manually remap the controls](xref:UnityEngine.InputSystem.InputActionRebindingExtensions). If you need to support a specific Device, you can also [add your own mapping for it](xref:input-system-hid#creating-a-custom-device-layout). See documentation on [HID](xref:input-system-hid) for more information. +The Input System supports any Device which implements the USB HID specification. However, for Devices which don't have specific [layouts](xref:input-system-layouts) implemented in the Input System, the system can only surface the information available from the HID descriptor of the Device, which limits how precisely it can describe a control. These Devices often work best when allowing the user to [manually remap the controls](xref:UnityEngine.InputSystem.InputActionRebindingExtensions). If you need to support a specific Device, you can also [add your own mapping for it](xref:input-system-hid#creating-a-custom-device-layout). Refer to documentation on [HID](xref:input-system-hid) for more information. ## PS5 controller support on Linux diff --git a/Packages/com.unity.inputsystem/Documentation~/Touch.md b/Packages/com.unity.inputsystem/Documentation~/Touch.md index e2e8be468d..9ef629a18d 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Touch.md +++ b/Packages/com.unity.inputsystem/Documentation~/Touch.md @@ -8,7 +8,7 @@ Touch support is divided into: * high-level support implemented in the [`EnhancedTouch.Touch`](#enhancedtouchtouch-class) class. > [!NOTE] -> You should not use [`Touchscreen`](#touchscreen-device) for polling. If you want to read out touches similar to [`UnityEngine.Input.touches`](https://docs.unity3d.com/ScriptReference/Input-touches.html), see [`EnhancedTouch`](#enhancedtouchtouch-class). If you read out touch state from [`Touchscreen`](#touchscreen-device) directly inside of the `Update` or `FixedUpdate` methods, your app will miss changes in touch state. +> You should not use [`Touchscreen`](#touchscreen-device) for polling. If you want to read out touches similar to [`UnityEngine.Input.touches`](https://docs.unity3d.com/ScriptReference/Input-touches.html), refer to [`EnhancedTouch`](#enhancedtouchtouch-class). If you read out touch state from [`Touchscreen`](#touchscreen-device) directly inside of the `Update` or `FixedUpdate` methods, your app will miss changes in touch state. Touch input is supported on Android, iOS, Windows, and the Universal Windows Platform (UWP). @@ -32,7 +32,7 @@ Additional to the [Controls inherited from `Pointer`](xref:input-system-pointers A touch screen Device consists of multiple [`TouchControls`](xref:UnityEngine.InputSystem.Controls.TouchControl). Each of these represents a potential finger touching the Device. The [`primaryTouch`](xref:UnityEngine.InputSystem.Touchscreen.primaryTouch) Control represents the touch which is currently driving the [`Pointer`](xref:input-system-pointers) representation, and which should be used to interact with the UI. This is usually the first finger that touches the screen. - [`primaryTouch`](xref:UnityEngine.InputSystem.Touchscreen.primaryTouch) is always identical to one of the entries in the [`touches`](xref:UnityEngine.InputSystem.Touchscreen.touches) array. The [`touches`](xref:UnityEngine.InputSystem.Touchscreen.touches) array contains all the touches that the system can track. This array has a fixed size, regardless of how many touches are currently active. If you need an API that only represents active touches, see the higher-level [`EnhancedTouch.Touch` class](#enhancedtouchtouch-class). + [`primaryTouch`](xref:UnityEngine.InputSystem.Touchscreen.primaryTouch) is always identical to one of the entries in the [`touches`](xref:UnityEngine.InputSystem.Touchscreen.touches) array. The [`touches`](xref:UnityEngine.InputSystem.Touchscreen.touches) array contains all the touches that the system can track. This array has a fixed size, regardless of how many touches are currently active. If you need an API that only represents active touches, refer to the higher-level [`EnhancedTouch.Touch` class](#enhancedtouchtouch-class). Each [`TouchControl`](xref:UnityEngine.InputSystem.Controls.TouchControl) on the Device, including [`primaryTouch`](xref:UnityEngine.InputSystem.Touchscreen.primaryTouch), is made up of the following child Controls: @@ -81,7 +81,7 @@ The [`EnhancedTouch.Touch`](xref:UnityEngine.InputSystem.EnhancedTouch.Touch) AP 2. By touch: Each touch is a single finger contact with at least a beginning point ([`PointerPhase.Began`](xref:UnityEngine.InputSystem.TouchPhase)) and an endpoint ([`PointerPhase.Ended`](xref:UnityEngine.InputSystem.TouchPhase) or [`PointerPhase.Cancelled`](xref:UnityEngine.InputSystem.TouchPhase)). Between those two points, an arbitrary number of [`PointerPhase.Moved`](xref:UnityEngine.InputSystem.TouchPhase) and/or [`PointerPhase.Stationary`](xref:UnityEngine.InputSystem.TouchPhase) records exist. All records in a touch have the same [`touchId`](xref:UnityEngine.InputSystem.Controls.TouchControl.touchId). You can use [Touch.activeTouches](xref:UnityEngine.InputSystem.EnhancedTouch.Touch.activeTouches) to get an array of all currently active touches. This lets you track how a specific touch moves over the screen, which is useful if you want to implement recognition of specific gestures. -See [`EnhancedTouch.Touch` API documentation](xref:UnityEngine.InputSystem.EnhancedTouch.Touch) for more details. +Refer to [`EnhancedTouch.Touch` API documentation](xref:UnityEngine.InputSystem.EnhancedTouch.Touch) for more details. > [!NOTE] > The [`Touch`](xref:UnityEngine.InputSystem.EnhancedTouch.Touch) and [`Finger`](xref:UnityEngine.InputSystem.EnhancedTouch.Finger) APIs don't generate GC garbage. The bulk of the data is stored in unmanaged memory that is indexed by wrapper structs. All arrays are pre-allocated. diff --git a/Packages/com.unity.inputsystem/Documentation~/UserManagement.md b/Packages/com.unity.inputsystem/Documentation~/UserManagement.md index 6b306b861e..aaeba14480 100644 --- a/Packages/com.unity.inputsystem/Documentation~/UserManagement.md +++ b/Packages/com.unity.inputsystem/Documentation~/UserManagement.md @@ -6,7 +6,7 @@ uid: input-system-user-management The Input System supports multi-user management through the [`InputUser`](xref:UnityEngine.InputSystem.Users.InputUser) class. This comprises both user account management features on platforms that have these capabilities built into them (such as Xbox and PS4), as well as features to manage Device allocations to one or more local users. > [!NOTE] -> The user management API is quite low-level in nature. The stock functionality of Player Input Manager component (see [Player Input Manager](xref:input-system-player-input-manager)) provides an easier way to set up user management. The API described here is useful when you want more control over user management. +> The user management API is quite low-level in nature. The stock functionality of Player Input Manager component (refer to [Player Input Manager](xref:input-system-player-input-manager)) provides an easier way to set up user management. The API described here is useful when you want more control over user management. In the Input System, each [`InputUser`](xref:UnityEngine.InputSystem.Users.InputUser) represents a human interacting with the application. For example, you can have multiple users playing a game together on a single computer or device (local multiplayer), where each user has one or more [paired Input Devices](#device-pairing). diff --git a/Packages/com.unity.inputsystem/Documentation~/Workflow-Direct.md b/Packages/com.unity.inputsystem/Documentation~/Workflow-Direct.md index 20484f1522..42af1c3cb0 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Workflow-Direct.md +++ b/Packages/com.unity.inputsystem/Documentation~/Workflow-Direct.md @@ -57,6 +57,6 @@ If you choose to use this technique: You can find an example of this workflow in the sample projects included with the input system package. To find it, in the Project window, look in **Assets > Samples > SimpleDemo** and open the scene: **SimpleDemo_UsingState**. -See [Supported Devices](SupportedDevices.html) for more information about devices supported by the input system, and the API to read their states. +Refer to [Supported Devices](SupportedDevices.html) for more information about devices supported by the input system, and the API to read their states. -For more a more flexible workflow, see the [Actions Workflow](Workflow-Actions.html). +For more a more flexible workflow, refer to the [Actions Workflow](Workflow-Actions.html). diff --git a/Packages/com.unity.inputsystem/Documentation~/index.md b/Packages/com.unity.inputsystem/Documentation~/index.md index e348399e11..47e1e01b8d 100644 --- a/Packages/com.unity.inputsystem/Documentation~/index.md +++ b/Packages/com.unity.inputsystem/Documentation~/index.md @@ -19,4 +19,4 @@ This **Input System package** is a newer, more flexible system, which allows you During the installation process for the Input System package, the installer offers to automatically deactivate the older built-in system. ([Read more](xref:input-system-installation)) -To get started, see the [Installation](xref:input-system-installation) and [Workflows](xref:input-system-workflows) sections. For a demo project, see the [Warriors demo](https://github.com/UnityTechnologies/InputSystem_Warriors) on GitHub. +To get started, refer to the [Installation](xref:input-system-installation) and [Workflows](xref:input-system-workflows) sections. For a demo project, refer to the [Warriors demo](https://github.com/UnityTechnologies/InputSystem_Warriors) on GitHub.