Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.12.0] - 2025-01-15

### Fixed
- Fixed an issue causing the Action context menu to not show on right click when right clicking an action in the Input Action Editor [ISXB-1134](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1134).
- Reverted changes from 0ddd534d8 (ISXB-746) which introduced a regression [ISXB-1127](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1127).
- Fixed `ArgumentNullException: Value cannot be null.` during the migration of Project-wide Input Actions from `InputManager.asset` to `InputSystem_Actions.inputactions` asset which lead do the lost of the configuration [ISXB-1105](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1105).
- Fixed pointerId staying the same when simultaneously releasing and then pressing in the same frame on mobile using touch. [ISXB-1006](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-845).
- Fixed ISubmitHandler.OnSubmit event processing when operating in Manual Update mode (ISXB-1141).
- Fixed Rename mode is not entered and name is autocompleted to default when creating a new Action Map on 2022.3. [ISXB-1151](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1151).
- Fixed unexpected control scheme switch when using `OnScreenControl` and pointer based schemes which registed "Cancel" event on every frame.[ISXB-656](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-656).
- Fixed an issue with The "Add Control Scheme..." popup window so that it now persists until any changes are explicitly Saved or Cancelled [case ISXB-1131](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1131).
- Fixed missing documentation for source generated Input Action Assets. This is now generated as part of the source code generation step when "Generate C# Class" is checked in the importer inspector settings.
- Fixed pasting into an empty map list raising an exception. [ISXB-1150](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1150)
- Fixed pasting bindings into empty Input Action asset. [ISXB-1180](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1180)
- Fixed missing '&' symbol in Control Scheme dropdown on Windows platform. [ISXB-1109](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1109)
- Fixed icon scaling in Input Actions window.
- Fixed an issue where removing the InputSystem package could lead to invalid input handling settings.
- Fixed `ArgumentOutOfRangeException` when adding a new Control Scheme with any Device selected. [ISXB-1129](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1129)
- Fixed a CS0105 compiler warning due to duplicate using statement in test source code (ISXB-1247).
- Fixed tooltip support in the UI Toolkit version of the Input Actions Asset editor.
- Fixed documentation to clarify bindings with modifiers `overrideModifiersNeedToBePressedFirst` configuration [ISXB-806](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-806).
- Fixed an issue in `Samples/Visualizers/GamepadVisualizer.unity` sample where the visualization wouldn't handle device disconnects or current device changes properly (ISXB-1243).
- Fixed an issue when displaying Serialized InputAction's Processor properties inside the Inspector window. [ISXB-1269](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1269)
- Fixed an issue with default device selection when adding new Control Scheme.
- Fixed an issue where action map delegates were not updated when the asset already assigned to the PlayerInput component were changed [ISXB-711](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-711).
- Fixed Action properties edition in the UI Toolkit version of the Input Actions Asset editor. [ISXB-1277](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1277)
- Fixed an editor crash caused by input debugger device state window reusing cached state when reconnecting Stadia controller. [ISXB-658](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-658)
- Fixed an issue where batch jobs would fail with "Error: Error building Player because scripts are compiling" if a source generated .inputactions asset is out of sync with its generated source code (ISXB-1300).
- Fixed multiple `OnScreenStick` Components that does not work together when using them simultaneously in isolation mode. [ISXB-813](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-813)
- Fixed an issue in input actions editor window that caused certain fields in custom input composite bindings to require multiple clicks to action / focus. [ISXB-1171](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1171)
- Fixed an editor/player hang in `InputSystemUIInputModule` due to an infinite loop. This was caused by the assumption that `RemovePointerAtIndex` would _always_ successfully remove the pointer, which is not the case with touch based pointers. [ISXB-1258](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1258)

### Changed
- Changed location of the link xml file (code stripping rules), from a temporary directory to the project Library folder (ISX-2140).
- Added back the InputManager to InputSystem project-wide asset migration code with performance improvement (ISX-2086).
- Changed `OnScreenControl` to automaticaly switch, in Single Player with autoswitch enabled, to the target device control scheme when the first component is enabled to prevent bad interactions when it start.
- Changed paremeter `overrideModifiersNeedToBePressedFirst` to obsolete for `ButtonWithOneModifier`, `ButtonWithTwoModifiers`, `OneModifierComposite` and `TwoModifiersComposite` in favour the new `modifiersOrder` parameter which is more explicit.
- Changed `Samples/Visualizers/GamepadVisualizer.unity` to visualize the control values of the current device instead of the first device.

### Added
- Added new API `InputSystem.settings.useIMGUIEditorForAssets` that should be used in custom `InputParameterEditor` that use both IMGUI and UI Toolkit.
- Added ProfilerMakers to `InputAction.Enable()` and `InputActionMap.ResolveBindings()` to enable gathering of profiling data.
- Added throwing an error message when trying to use the Input System package on console without the extension package installed.
  • Loading branch information
Unity Technologies committed Jan 15, 2025
1 parent 8cb28d7 commit 05631d1
Show file tree
Hide file tree
Showing 124 changed files with 10,317 additions and 1,584 deletions.
1 change: 1 addition & 0 deletions .signature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"timestamp":1737020322,"signature":"PdimvrUBR29LsZgyaI/7Bm+nzjuugBdQ5zBtKxEw9A+PqIv09hUHibJabnoksz19QA3zR2eOGcDPxmZg5Uy1ELSJX54gDmo0KuofPBA8lswUT/PSDlqijS64IfdCt7QuYq2BGq7U7HHQuOjPBLWqkJE4LhLiKu5SssSjZ0ikME3SrwthwNDgt2LTMO+niM7DPxiKukiVaZlmCJPL+kZeBD5YqZ89O3IGGn/t3w/YsX32X2Iq3BirCWpwKpKjFo7vyglcPTyoPx2J7KAYk280OFuq3FwkF0bTjgYOcbN1v/8i4Xu4qIcNrAvAxTYhSJo++iyaUEqoqd40cK2EjNUDDnCRi9mIIMZmD5stB9nehq9+GN+x1Ne6Al6dYGTkVBxnz9WiVPz75JI2DW8B4nLBMVFuOg9+FRT0eZZcn73x5VwXBIl26F+18ZYKpTJVuY3FvTXJ7G7dRwIvuo/RVB8yuyu8jE1m1QC35W+7yeIOKSqCAvqwZF0gDXIXMPzQVyig","publicKey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSUlCaWdLQ0FZRUFzdUhXYUhsZ0I1cVF4ZEJjTlJKSAordHR4SmoxcVY1NTdvMlZaRE1XaXhYRVBkRTBEMVFkT1JIRXNSS1RscmplUXlERU83ZlNQS0ZwZ1A3MU5TTnJCCkFHM2NFSU45aHNQVDhOVmllZmdWem5QTkVMenFkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9ySTRibG4KS0twelJlNW14OTc1SjhxZ1FvRktKT0NNRlpHdkJMR2MxSzZZaEIzOHJFODZCZzgzbUovWjBEYkVmQjBxZm13cgo2ZDVFUXFsd0E5Y3JZT1YyV1VpWXprSnBLNmJZNzRZNmM1TmpBcEFKeGNiaTFOaDlRVEhUcU44N0ZtMDF0R1ZwCjVNd1pXSWZuYVRUemEvTGZLelR5U0pka0tldEZMVGdkYXpMYlpzUEE2aHBSK0FJRTJhc0tLTi84UUk1N3UzU2cKL2xyMnZKS1IvU2l5eEN1Q20vQWJkYnJMbXk0WjlSdm1jMGdpclA4T0lLQWxBRWZ2TzV5Z2hSKy8vd1RpTFlzUQp1SllDM0V2UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"}
49 changes: 46 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,50 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Due to package verification, the latest version below is the unpublished version and the date is meaningless.
however, it has to be formatted properly to pass verification tests.

## [1.12.0] - 2025-01-15

### Fixed
- Fixed an issue causing the Action context menu to not show on right click when right clicking an action in the Input Action Editor [ISXB-1134](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1134).
- Reverted changes from 0ddd534d8 (ISXB-746) which introduced a regression [ISXB-1127](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1127).
- Fixed `ArgumentNullException: Value cannot be null.` during the migration of Project-wide Input Actions from `InputManager.asset` to `InputSystem_Actions.inputactions` asset which lead do the lost of the configuration [ISXB-1105](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1105).
- Fixed pointerId staying the same when simultaneously releasing and then pressing in the same frame on mobile using touch. [ISXB-1006](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-845).
- Fixed ISubmitHandler.OnSubmit event processing when operating in Manual Update mode (ISXB-1141).
- Fixed Rename mode is not entered and name is autocompleted to default when creating a new Action Map on 2022.3. [ISXB-1151](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1151).
- Fixed unexpected control scheme switch when using `OnScreenControl` and pointer based schemes which registed "Cancel" event on every frame.[ISXB-656](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-656).
- Fixed an issue with The "Add Control Scheme..." popup window so that it now persists until any changes are explicitly Saved or Cancelled [case ISXB-1131](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1131).
- Fixed missing documentation for source generated Input Action Assets. This is now generated as part of the source code generation step when "Generate C# Class" is checked in the importer inspector settings.
- Fixed pasting into an empty map list raising an exception. [ISXB-1150](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1150)
- Fixed pasting bindings into empty Input Action asset. [ISXB-1180](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1180)
- Fixed missing '&' symbol in Control Scheme dropdown on Windows platform. [ISXB-1109](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1109)
- Fixed icon scaling in Input Actions window.
- Fixed an issue where removing the InputSystem package could lead to invalid input handling settings.
- Fixed `ArgumentOutOfRangeException` when adding a new Control Scheme with any Device selected. [ISXB-1129](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1129)
- Fixed a CS0105 compiler warning due to duplicate using statement in test source code (ISXB-1247).
- Fixed tooltip support in the UI Toolkit version of the Input Actions Asset editor.
- Fixed documentation to clarify bindings with modifiers `overrideModifiersNeedToBePressedFirst` configuration [ISXB-806](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-806).
- Fixed an issue in `Samples/Visualizers/GamepadVisualizer.unity` sample where the visualization wouldn't handle device disconnects or current device changes properly (ISXB-1243).
- Fixed an issue when displaying Serialized InputAction's Processor properties inside the Inspector window. [ISXB-1269](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1269)
- Fixed an issue with default device selection when adding new Control Scheme.
- Fixed an issue where action map delegates were not updated when the asset already assigned to the PlayerInput component were changed [ISXB-711](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-711).
- Fixed Action properties edition in the UI Toolkit version of the Input Actions Asset editor. [ISXB-1277](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1277)
- Fixed an editor crash caused by input debugger device state window reusing cached state when reconnecting Stadia controller. [ISXB-658](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-658)
- Fixed an issue where batch jobs would fail with "Error: Error building Player because scripts are compiling" if a source generated .inputactions asset is out of sync with its generated source code (ISXB-1300).
- Fixed multiple `OnScreenStick` Components that does not work together when using them simultaneously in isolation mode. [ISXB-813](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-813)
- Fixed an issue in input actions editor window that caused certain fields in custom input composite bindings to require multiple clicks to action / focus. [ISXB-1171](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1171)
- Fixed an editor/player hang in `InputSystemUIInputModule` due to an infinite loop. This was caused by the assumption that `RemovePointerAtIndex` would _always_ successfully remove the pointer, which is not the case with touch based pointers. [ISXB-1258](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1258)

### Changed
- Changed location of the link xml file (code stripping rules), from a temporary directory to the project Library folder (ISX-2140).
- Added back the InputManager to InputSystem project-wide asset migration code with performance improvement (ISX-2086).
- Changed `OnScreenControl` to automaticaly switch, in Single Player with autoswitch enabled, to the target device control scheme when the first component is enabled to prevent bad interactions when it start.
- Changed paremeter `overrideModifiersNeedToBePressedFirst` to obsolete for `ButtonWithOneModifier`, `ButtonWithTwoModifiers`, `OneModifierComposite` and `TwoModifiersComposite` in favour the new `modifiersOrder` parameter which is more explicit.
- Changed `Samples/Visualizers/GamepadVisualizer.unity` to visualize the control values of the current device instead of the first device.

### Added
- Added new API `InputSystem.settings.useIMGUIEditorForAssets` that should be used in custom `InputParameterEditor` that use both IMGUI and UI Toolkit.
- Added ProfilerMakers to `InputAction.Enable()` and `InputActionMap.ResolveBindings()` to enable gathering of profiling data.
- Added throwing an error message when trying to use the Input System package on console without the extension package installed.

## [1.11.2] - 2024-10-16

### Fixed
Expand All @@ -17,14 +61,12 @@ however, it has to be formatted properly to pass verification tests.
- Fixed "AnalyticsResult" errors on consoles [ISXB-1107]
- Fixed wrong `Display Index` value for touchscreen events.[ISXB-1101](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1101)
- Fixed event handling when using Fixed Update processing where WasPressedThisFrame could appear to true for consecutive frames [ISXB-1006](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1006)
- Removed a redundant warning when using fallback code to parse a HID descriptor. (UUM-71260)

### Added
- Added the display of the device flag `CanRunInBackground` in device debug view.
- Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions` when exiting play-mode.

### Fixed
- Removed a redundant warning when using fallback code to parse a HID descriptor. (UUM-71260)

### Changed
- Removed the InputManager to InputSystem project-wide asset migration code for performance improvement (ISX-2086)

Expand All @@ -38,6 +80,7 @@ however, it has to be formatted properly to pass verification tests.
- Fixed potential crash on Mac when using stale references to deleted InputDevice objects [ISXB-606](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-606).
- Fixed conditional compilation for non-editor analytics on platforms not enabling analytics.
- Fixed simulated touch input not working with PlayerInput component [ISXB-483](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-483).
- Fixed unused PenState information to determine the displayIndex on platforms providing it. (PLAT-10123)

### Changed
- Renamed editor Resources directories to PackageResources to fix package validation warnings.
Expand Down
8 changes: 8 additions & 0 deletions DocCodeSamples.Tests.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions DocCodeSamples.Tests/DocCodeSamples.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Unity.InputSystem.DocCodeSamples",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 7 additions & 0 deletions DocCodeSamples.Tests/DocCodeSamples.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions DocCodeSamples.Tests/GamepadExample.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using UnityEngine;
using UnityEngine.InputSystem;

namespace DocCodeSamples.Tests
{
internal class GamepadExample : MonoBehaviour
{
void Start()
{
// Print all connected gamepads
Debug.Log(string.Join("\n", Gamepad.all));
}

void Update()
{
var gamepad = Gamepad.current;

// No gamepad connected.
if (gamepad == null)
{
return;
}

// Check if "Button North" was pressed this frame
if (gamepad.buttonNorth.wasPressedThisFrame)
{
Debug.Log("Button North was pressed");
}

// Check if the button control is being continuously actuated and read its value
if (gamepad.rightTrigger.IsActuated())
{
Debug.Log("Right trigger value: " + gamepad.rightTrigger.ReadValue());
}

// Read left stick value and perform some code based on the value
Vector2 move = gamepad.leftStick.ReadValue();
{
// Use the Vector2 move for the game logic here
}

// Creating haptic feedback while "Button South" is pressed and stopping it when released.
if (gamepad.buttonSouth.wasPressedThisFrame)
{
gamepad.SetMotorSpeeds(0.2f, 1.0f);
}
else if (gamepad.buttonSouth.wasReleasedThisFrame)
{
gamepad.ResetHaptics();
}
}
}
}
3 changes: 3 additions & 0 deletions DocCodeSamples.Tests/GamepadExample.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions DocCodeSamples.Tests/GamepadHapticsExample.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using UnityEngine;
using UnityEngine.InputSystem;

namespace DocCodeSamples.Tests
{
internal class GamepadHapticsExample : MonoBehaviour
{
bool hapticsArePaused = false;

void Update()
{
var gamepad = Gamepad.current;

// No gamepad connected, no need to continue.
if (gamepad == null)
return;

float leftTrigger = gamepad.leftTrigger.ReadValue();
float rightTrigger = gamepad.rightTrigger.ReadValue();

// Only set motor speeds if haptics were not paused and if trigger is actuated.
// Both triggers must be actuated past 0.2f to start haptics.
if (!hapticsArePaused &&
(gamepad.leftTrigger.IsActuated() || gamepad.rightTrigger.IsActuated()))
gamepad.SetMotorSpeeds(
leftTrigger < 0.2f ? 0.0f : leftTrigger,
rightTrigger < 0.2f ? 0.0f : rightTrigger);

// Toggle haptics "playback" when "Button South" is pressed.
// Notice that if you release the triggers after pausing,
// and press the button again, haptics will resume.
if (gamepad.buttonSouth.wasPressedThisFrame)
{
if (hapticsArePaused)
gamepad.ResumeHaptics();
else
gamepad.PauseHaptics();

hapticsArePaused = !hapticsArePaused;
}

// Notice that if you release the triggers after pausing,
// and press the Start button, haptics will be reset.
if (gamepad.startButton.wasPressedThisFrame)
gamepad.ResetHaptics();
}
}
}
3 changes: 3 additions & 0 deletions DocCodeSamples.Tests/GamepadHapticsExample.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#if UNITY_INPUT_SYSTEM_ENABLE_UI

using UnityEngine;
using UnityEngine.InputSystem.UI;

namespace DocCodeSamples.Tests
{
internal class InputSystemUIInputModuleAssignActionsExample : MonoBehaviour
{
// Reference to the InputSystemUIInputModule component, needs to be provided in the Inspector
public InputSystemUIInputModule uiModule;

void Start()
{
// Assign default actions
AssignActions();
}

void AssignActions()
{
if (uiModule != null)
uiModule.AssignDefaultActions();
else
Debug.LogError("InputSystemUIInputModule not found.");
}

void UnassignActions()
{
if (uiModule != null)
uiModule.UnassignActions();
else
Debug.LogError("InputSystemUIInputModule not found.");
}

void OnDestroy()
{
// Unassign actions when the object is destroyed
UnassignActions();
}
}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Documentation~/Images/TimingEventGrouping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/Images/TimingFastFPS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/Images/TimingInputsPerFrame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/Images/TimingSlowFPS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions Documentation~/TableOfContents.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
* [Events](Events.md)
* [Layouts](Layouts.md)
* [User Management](UserManagement.md)
* [Timing and latency](timing-and-latency.md)
* [Input events queue](timing-input-events-queue.md)
* [Select an input processing mode](timing-select-mode.md)
* [Optimize for dynamic update](timing-optimize-dynamic-update.md)
* [Optimize for fixed update](timing-optimize-fixed-update.md)
* [Avoid missed or duplicate events](timing-missed-duplicate-events.md)
* [Mixed timing scenarios](timing-mixed-scenarios.md)
* [Supported Input Devices](SupportedDevices.md)
* [Pointers](Pointers.md)
* [Touch support](Touch.md)
Expand Down
1 change: 1 addition & 0 deletions Documentation~/UISupport.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The three main UI solutions are **UI Toolkit**, **Unity UI**, and **IMGUI**. The

- From Unity 2023.2 and onwards, the UI actions defined in the default [project-wide actions](./ProjectWideActions.md) directly map to UI Toolkit input. You do not need to use the UI Input Module component.</br></br>
- In versions of Unity prior to 2023.2, you must use the UI Input Module component to define which actions are passed through from the Input System to the UI.
- Refer to UI Toolkit [Runtime UI event system and input handling](https://docs.unity3d.com/Manual/UIE-Runtime-Event-System.html) for more information on how to configure UI Toolkit input.

**For [**Unity UI**](https://docs.unity3d.com/Packages/com.unity.ugui@latest), also known as "uGUI" (a GameObject and Component style UI solution):**

Expand Down
21 changes: 21 additions & 0 deletions Documentation~/timing-and-latency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
uid: timing-latency
---
# Timing and Latency

Input Timing refers to the topic of exactly when the Input System receives and processes input from devices.

Latency is the amount of time between the user providing some input, and the user receiving a response to that input. For example, the time between a button press and your game’s character moving on-screen. In fast-paced input scenarios such as action games, even tiny delays between the user's input and your game responding can be noticeable and affect the feel of your gameplay.

In addition to the effects of latency, timing can affect one-off discrete events such as when a button press starts or finishes. Checking for these at the wrong time can result in missed or duplicate events.

To minimize input latency, and to avoid missed or duplicate events, it helps to understand how the Input System processes events in relation to Unity's frame updates, physics updates, and fixed updates. This will help you make decisions about how to read and respond to input in your game or app.

| **Topic** | **Description** |
| :------------------------------ | :------------------------------- |
| **[Input events queue](timing-input-events-queue.md)** | Understand how and when the Input System receives and processes input from devices. |
| **[Select an input processing mode](timing-select-mode.md)** | How to select an appropriate **Update Mode** which controls when the Input System processes queued input events. |
| **[Optimize for dynamic update](timing-optimize-dynamic-update.md)** | How to optimize input for use in `Update` calls. |
| **[Optimize for fixed update](timing-optimize-fixed-update.md)** | How to optimize input for use in `FixedUpdate` calls. |
| **[Avoid missed or duplicate events](timing-missed-duplicate-events.md)** | How to avoid missing or duplicated discrete input events like when a button was pressed or released. |
| **[Mixed timing scenarios](timing-mixed-scenarios.md)** | How to optimize and avoid problems when using input in both `Update` and `FixedUpdate` calls. |
Loading

0 comments on commit 05631d1

Please sign in to comment.