-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [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
Showing
124 changed files
with
10,317 additions
and
1,584 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
DocCodeSamples.Tests/InputSystemUIInputModuleAssignActionsExample.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
3 changes: 3 additions & 0 deletions
3
DocCodeSamples.Tests/InputSystemUIInputModuleAssignActionsExample.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
Oops, something went wrong.