FIX: InputDeviceTester only shows first touch contact (IXSB-1017) (#1985)

The logic checking for duplicate "Began" phases with a touch contact was incorrect and has been corrected.

Co-authored-by: Paulius Dervinis <54306142+Pauliusd01@users.noreply.github.com>
This commit is contained in:
Tim Keosababian 2024-08-19 03:11:24 -07:00 коммит произвёл GitHub
Родитель 730bb23fb7
Коммит cf28d7d284
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -84,7 +84,8 @@ public class TouchISX : MonoBehaviour
int id = control.touchId.ReadValue();
// Sometimes the Began phase is detected twice. The redundant one needs to be filtered out
if (m_HighlightPool.Find(id.ToString()) != null) return;
if (m_HighlightPool.Find(id.ToString())?.gameObject?.activeSelf ?? false)
return;
Vector2 pos = Camera.main.ScreenToWorldPoint(control.position.ReadValue());

Просмотреть файл

@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests.
### Fixed
- Fixed memory allocation on every frame when using UIDocument without EventSystem. [ISXB-953](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-953)
- Fixed Action Maps name edition which could be inconsistent in Input Action Editor UI.
- Fixed InputDeviceTester sample only visualizing a given touch contact once. [ISXB-1017](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1017)
### Added
- Added Hinge Angle sensor support for foldable devices.