Skip to content

Commit e088c49

Browse files
authored
Merge branch 'develop' into docf-1179-fixedupdate-vs-update
2 parents 744411f + 40dc911 commit e088c49

File tree

20 files changed

+280
-320
lines changed

20 files changed

+280
-320
lines changed

.github/pull_request_template.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
### Description
22

3-
_Please fill this section with a description what the pull request is trying to address._
3+
_Please fill this section with a description what the pull request is trying to address and what changes were made._
44

5-
### Changes made
65

7-
_Please write down a short description of what changes were made._
8-
9-
### Testing
6+
### Testing status & QA
107

118
_Please describe the testing already done by you and what testing you request/recommend QA to execute. If you used or created any testing project please link them here too for QA._
129

13-
### Risk
10+
### Overall Product Risks
11+
12+
_Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any._
13+
14+
- Complexity:
15+
- Halo Effect:
16+
17+
### Comments to reviewers
1418

15-
_Please describe the potential risks of your changes for the reviewers._
19+
_Please describe any additional information such as what to focus on, or historical info for the reviewers._
1620

1721
### Checklist
1822

Assets/Samples/InGameHints/InGameHintsActions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
4-
// version 1.11.2
4+
// version 1.11.3
55
// from Assets/Samples/InGameHints/InGameHintsActions.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if

Assets/Samples/SimpleDemo/SimpleControls.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
4-
// version 1.11.2
4+
// version 1.11.3
55
// from Assets/Samples/SimpleDemo/SimpleControls.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if

Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
4-
// version 1.11.2
4+
// version 1.11.3
55
// from Assets/Tests/InputSystem/InputActionCodeGeneratorActions.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if

Assets/Tests/InputSystem/Plugins/UITests.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3876,8 +3876,8 @@ public IEnumerator UI_WhenCursorIsLockedToScreenCenter_PointerEnterAndExitEvents
38763876
#if UNITY_2022_3_OR_NEWER // displayIndex is only available from 2022.3 onwards
38773877

38783878
[UnityTest]
3879-
#if UNITY_TVOS
3880-
[Ignore("Failing on tvOS https://jira.unity3d.com/browse/ISX-448")]
3879+
#if UNITY_TVOS || UNITY_ANDROID
3880+
[Ignore("Failing on TVOS & Android https://jira.unity3d.com/browse/ISX-2029")]
38813881
#endif
38823882
public IEnumerator UI_DisplayIndexMatchesDisplayWithTouchscreenOnScreenSpaceCanvas()
38833883
{
@@ -3927,9 +3927,8 @@ public IEnumerator UI_DisplayIndexMatchesDisplayWithTouchscreenOnScreenSpaceCanv
39273927
}
39283928

39293929
[UnityTest]
3930-
#if UNITY_TVOS
3931-
[Ignore("Failing on tvOS https://jira.unity3d.com/browse/ISX-448")]
3932-
#else
3930+
#if UNITY_TVOS || UNITY_ANDROID
3931+
[Ignore("Failing on TVOS & Android https://jira.unity3d.com/browse/ISX-2029")]
39333932
#endif
39343933
public IEnumerator UI_DisplayIndexMatchesDisplayWithTouchscreenOnOverlayCanvas()
39353934
{
@@ -3980,8 +3979,8 @@ public IEnumerator UI_DisplayIndexMatchesDisplayWithTouchscreenOnOverlayCanvas()
39803979
}
39813980

39823981
[UnityTest]
3983-
#if UNITY_TVOS
3984-
[Ignore("Failing on tvOS https://jira.unity3d.com/browse/ISX-448")]
3982+
#if UNITY_TVOS || UNITY_ANDROID
3983+
[Ignore("Failing on TVOS & Android https://jira.unity3d.com/browse/ISX-2029")]
39853984
#endif
39863985
public IEnumerator UI_DisplayIndexMatchesDisplayWithMouseOnScreenSpaceCanvas()
39873986
{
@@ -4032,6 +4031,9 @@ public IEnumerator UI_DisplayIndexMatchesDisplayWithMouseOnScreenSpaceCanvas()
40324031
}
40334032

40344033
[UnityTest]
4034+
#if UNITY_ANDROID
4035+
[Ignore("Failing on Android https://jira.unity3d.com/browse/ISX-2029")]
4036+
#endif
40354037
public IEnumerator UI_DisplayIndexMatchesDisplayWithMouseOnOverlayCanvas()
40364038
{
40374039
// Setup the Test Scene
@@ -4082,8 +4084,8 @@ public IEnumerator UI_DisplayIndexMatchesDisplayWithMouseOnOverlayCanvas()
40824084
}
40834085

40844086
[UnityTest]
4085-
#if UNITY_TVOS
4086-
[Ignore("Failing on tvOS https://jira.unity3d.com/browse/ISX-448")]
4087+
#if UNITY_TVOS || UNITY_ANDROID
4088+
[Ignore("Failing on TVOS & Android https://jira.unity3d.com/browse/ISX-2029")]
40874089
#endif
40884090
public IEnumerator UI_DisplayIndexMatchesDisplayMultiplePointers()
40894091
{

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,27 @@ however, it has to be formatted properly to pass verification tests.
1010

1111
## [Unreleased] - yyyy-mm-dd
1212

13+
14+
15+
## [1.11.2] - 2024-10-16
16+
1317
### Fixed
18+
- Fixed touch pointers being released twice causing an index out of bounds error. [ISXB-687](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-687)
1419
- Fixed `NullReferenceException` from disconnecting and reconnecting a GXDKGamepad.
20+
- Fixed wrong mapping of Xbox Series S|X and Xbox One wireless controllers "View" button on macOS.[ISXB-385](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-385)
21+
- Fixed "AnalyticsResult" errors on consoles [ISXB-1107]
22+
- Fixed wrong `Display Index` value for touchscreen events.[ISXB-1101](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1101)
23+
- 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)
1524

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

2029
### Fixed
21-
- Fixed wrong mapping of Xbox Series S|X and Xbox One wireless controllers "View" button on macOS.[ISXB-385](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-385)
30+
- Removed a redundant warning when using fallback code to parse a HID descriptor. (UUM-71260)
31+
32+
### Changed
33+
- Removed the InputManager to InputSystem project-wide asset migration code for performance improvement (ISX-2086)
2234

2335
## [1.11.1] - 2024-09-26
2436

@@ -29,6 +41,7 @@ however, it has to be formatted properly to pass verification tests.
2941
- Fixed "MissingReferenceException" errors when closing an in-game dropdown field [ISXB-1081](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1081).
3042
- 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).
3143
- Fixed conditional compilation for non-editor analytics on platforms not enabling analytics.
44+
- Fixed simulated touch input not working with PlayerInput component [ISXB-483](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-483).
3245

3346
### Changed
3447
- Renamed editor Resources directories to PackageResources to fix package validation warnings.

Packages/com.unity.inputsystem/InputSystem/Actions/InputAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ public unsafe bool WasPressedThisFrame()
12361236
{
12371237
var actionStatePtr = &state.actionStates[m_ActionIndexInState];
12381238
var currentUpdateStep = InputUpdate.s_UpdateStepCount;
1239-
return actionStatePtr->pressedInUpdate == currentUpdateStep && currentUpdateStep != default;
1239+
return actionStatePtr->pressedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount;
12401240
}
12411241

12421242
return false;
@@ -1285,7 +1285,7 @@ public unsafe bool WasReleasedThisFrame()
12851285
{
12861286
var actionStatePtr = &state.actionStates[m_ActionIndexInState];
12871287
var currentUpdateStep = InputUpdate.s_UpdateStepCount;
1288-
return actionStatePtr->releasedInUpdate == currentUpdateStep && currentUpdateStep != default;
1288+
return actionStatePtr->releasedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount;
12891289
}
12901290

12911291
return false;
@@ -1344,7 +1344,7 @@ public unsafe bool WasPerformedThisFrame()
13441344
{
13451345
var actionStatePtr = &state.actionStates[m_ActionIndexInState];
13461346
var currentUpdateStep = InputUpdate.s_UpdateStepCount;
1347-
return actionStatePtr->lastPerformedInUpdate == currentUpdateStep && currentUpdateStep != default;
1347+
return actionStatePtr->lastPerformedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount;
13481348
}
13491349

13501350
return false;
@@ -1417,7 +1417,7 @@ public unsafe bool WasCompletedThisFrame()
14171417
{
14181418
var actionStatePtr = &state.actionStates[m_ActionIndexInState];
14191419
var currentUpdateStep = InputUpdate.s_UpdateStepCount;
1420-
return actionStatePtr->lastCompletedInUpdate == currentUpdateStep && currentUpdateStep != default;
1420+
return actionStatePtr->lastCompletedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount;
14211421
}
14221422

14231423
return false;

Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ private void RestoreActionStatesAfterReResolvingBindings(UnmanagedMemory oldStat
560560
newActionState.releasedInUpdate = oldActionState.releasedInUpdate;
561561
newActionState.startTime = oldActionState.startTime;
562562
newActionState.bindingIndex = oldActionState.bindingIndex;
563+
newActionState.frame = oldActionState.frame;
563564

564565
if (oldActionState.phase != InputActionPhase.Disabled)
565566
{
@@ -884,6 +885,7 @@ public void ResetActionState(int actionIndex, InputActionPhase toPhase = InputAc
884885
actionState->lastCompletedInUpdate = default;
885886
actionState->pressedInUpdate = default;
886887
actionState->releasedInUpdate = default;
888+
actionState->frame = default;
887889
}
888890

889891
Debug.Assert(!actionState->isStarted, "Cannot reset an action to started phase");
@@ -1579,6 +1581,7 @@ private void ProcessButtonState(ref TriggerState trigger, int actionIndex, Bindi
15791581
{
15801582
actionState->pressedInUpdate = InputUpdate.s_UpdateStepCount;
15811583
actionState->isPressed = true;
1584+
actionState->frame = Time.frameCount;
15821585
}
15831586
else if (actionState->isPressed)
15841587
{
@@ -1587,6 +1590,7 @@ private void ProcessButtonState(ref TriggerState trigger, int actionIndex, Bindi
15871590
{
15881591
actionState->releasedInUpdate = InputUpdate.s_UpdateStepCount;
15891592
actionState->isPressed = false;
1593+
actionState->frame = Time.frameCount;
15901594
}
15911595
}
15921596
}
@@ -2445,6 +2449,7 @@ private void ChangePhaseOfActionInternal(int actionIndex, TriggerState* actionSt
24452449
newState.magnitude = 0f;
24462450

24472451
newState.phase = newPhase;
2452+
newState.frame = Time.frameCount;
24482453
if (newPhase == InputActionPhase.Performed)
24492454
{
24502455
newState.lastPerformedInUpdate = InputUpdate.s_UpdateStepCount;
@@ -3627,7 +3632,7 @@ public int partIndex
36273632
/// other is to represent the current actuation state of an action as a whole. The latter is stored in <see cref="actionStates"/>
36283633
/// while the former is passed around as temporary instances on the stack.
36293634
/// </remarks>
3630-
[StructLayout(LayoutKind.Explicit, Size = 52)]
3635+
[StructLayout(LayoutKind.Explicit, Size = 56)]
36313636
public struct TriggerState
36323637
{
36333638
public const int kMaxNumMaps = byte.MaxValue;
@@ -3651,6 +3656,7 @@ public struct TriggerState
36513656
[FieldOffset(40)] private uint m_PressedInUpdate;
36523657
[FieldOffset(44)] private uint m_ReleasedInUpdate;
36533658
[FieldOffset(48)] private uint m_LastCompletedInUpdate;
3659+
[FieldOffset(52)] private int m_Frame;
36543660

36553661
/// <summary>
36563662
/// Phase being triggered by the control value change.
@@ -3806,6 +3812,12 @@ public uint lastPerformedInUpdate
38063812
set => m_LastPerformedInUpdate = value;
38073813
}
38083814

3815+
internal int frame
3816+
{
3817+
get => m_Frame;
3818+
set => m_Frame = value;
3819+
}
3820+
38093821
/// <summary>
38103822
/// Update step count (<see cref="InputUpdate.s_UpdateStepCount"/>) in which action completed last.
38113823
/// Zero if the action did not become completed yet. Also reset to zero when the action is hard reset.

Packages/com.unity.inputsystem/InputSystem/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static partial class InputSystem
1616
// Keep this in sync with "Packages/com.unity.inputsystem/package.json".
1717
// NOTE: Unfortunately, System.Version doesn't use semantic versioning so we can't include
1818
// "-preview" suffixes here.
19-
internal const string kAssemblyVersion = "1.11.2";
19+
internal const string kAssemblyVersion = "1.11.3";
2020
internal const string kDocUrl = "https://docs.unity3d.com/Packages/[email protected]";
2121
}
2222
}

Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was auto-generated by com.unity.inputsystem:InputLayoutCodeGenerator
4-
// version 1.11.2
4+
// version 1.11.3
55
// from "Keyboard" layout
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if

0 commit comments

Comments
 (0)