refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user