refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-21 01:22:02 +08:00
parent d71bf7d4a5
commit 283783954f
112 changed files with 778 additions and 907 deletions

View File

@@ -33,8 +33,7 @@ namespace Cryville.Unity.EventSystems {
for (int i = 0; i < input.touchCount; i++) {
Touch touch = input.GetTouch(i);
if (touch.type != TouchType.Indirect) {
bool pressed, released;
PointerEventData pointer = GetTouchPointerEventData(touch, out pressed, out released);
PointerEventData pointer = GetTouchPointerEventData(touch, out bool pressed, out bool released);
ProcessTouchPress(pointer, pressed, released);
if (!released) {
ProcessMove(pointer);
@@ -48,8 +47,7 @@ namespace Cryville.Unity.EventSystems {
return input.touchCount > 0;
}
protected new PointerEventData GetTouchPointerEventData(Touch input, out bool pressed, out bool released) {
PointerEventData pointerData;
bool created = GetPointerData(input.fingerId, out pointerData, create: true);
bool created = GetPointerData(input.fingerId, out PointerEventData pointerData, create: true);
pointerData.Reset();
pressed = created || input.phase == TouchPhase.Began;
released = input.phase == TouchPhase.Canceled || input.phase == TouchPhase.Ended;
@@ -65,7 +63,7 @@ namespace Cryville.Unity.EventSystems {
pointerData.position = input.position;
pointerData.button = PointerEventData.InputButton.Left;
if (input.phase == TouchPhase.Canceled) {
pointerData.pointerCurrentRaycast = default(RaycastResult);
pointerData.pointerCurrentRaycast = default;
}
else {
eventSystem.RaycastAll(pointerData, m_RaycastResultCache);