@@ -579,9 +579,8 @@ private void ProcessPointerMovement(ExtendedPointerEventData eventData, GameObje
579579 if ( ! sendPointerHoverToParent && current == pointerParent )
580580 break ;
581581
582- #if UNITY_2021_3_OR_NEWER
583582 eventData . fullyExited = current != commonRoot && eventData . pointerEnter != currentPointerTarget ;
584- #endif
583+
585584 ExecuteEvents . Execute ( current . gameObject , eventData , ExecuteEvents . pointerExitHandler ) ;
586585 eventData . hovered . Remove ( current . gameObject ) ;
587586
@@ -605,12 +604,10 @@ private void ProcessPointerMovement(ExtendedPointerEventData eventData, GameObje
605604 Transform current = currentPointerTarget . transform ;
606605 while ( current != null && ! PointerShouldIgnoreTransform ( current ) )
607606 {
608- #if UNITY_2021_3_OR_NEWER
609607 eventData . reentered = current == commonRoot && current != oldPointerEnter ;
610608 // if we are sending the event to parent, they are already in hover mode at that point. No need to bubble up the event.
611609 if ( sendPointerHoverToParent && eventData . reentered )
612610 break ;
613- #endif
614611
615612 ExecuteEvents . Execute ( current . gameObject , eventData , ExecuteEvents . pointerEnterHandler ) ;
616613 if ( wasMoved )
@@ -1926,9 +1923,7 @@ private int GetPointerStateIndexFor(InputControl control, bool createIfNotExists
19261923 eventData . pointerType = pointerType ;
19271924 eventData . pointerId = pointerId ;
19281925 eventData . touchId = touchId ;
1929- #if UNITY_2022_3_OR_NEWER
19301926 eventData . displayIndex = displayIndex ;
1931- #endif
19321927
19331928 // Make sure these don't linger around when we switch to a different kind of pointer.
19341929 eventData . trackedDeviceOrientation = default ;
@@ -2031,9 +2026,7 @@ private int AllocatePointer(int pointerId, int displayIndex, int touchId, UIPoin
20312026 eventData = new ExtendedPointerEventData ( eventSystem ) ;
20322027
20332028 eventData . pointerId = pointerId ;
2034- #if UNITY_2022_3_OR_NEWER
20352029 eventData . displayIndex = displayIndex ;
2036- #endif
20372030 eventData . touchId = touchId ;
20382031 eventData . pointerType = pointerType ;
20392032 eventData . control = control ;
@@ -2164,9 +2157,7 @@ private void OnPointCallback(InputAction.CallbackContext context)
21642157
21652158 ref var state = ref GetPointerStateForIndex ( index ) ;
21662159 state . screenPosition = context . ReadValue < Vector2 > ( ) ;
2167- #if UNITY_2022_3_OR_NEWER
21682160 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
2169- #endif
21702161 }
21712162
21722163 // NOTE: In the click events, we specifically react to the Canceled phase to make sure we do NOT perform
@@ -2195,9 +2186,7 @@ private void OnLeftClickCallback(InputAction.CallbackContext context)
21952186 state . changedThisFrame = true ;
21962187 if ( IgnoreNextClick ( ref context , wasPressed ) )
21972188 state . leftButton . ignoreNextClick = true ;
2198- #if UNITY_2022_3_OR_NEWER
21992189 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
2200- #endif
22012190 }
22022191
22032192 private void OnRightClickCallback ( InputAction . CallbackContext context )
@@ -2212,9 +2201,7 @@ private void OnRightClickCallback(InputAction.CallbackContext context)
22122201 state . changedThisFrame = true ;
22132202 if ( IgnoreNextClick ( ref context , wasPressed ) )
22142203 state . rightButton . ignoreNextClick = true ;
2215- #if UNITY_2022_3_OR_NEWER
22162204 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
2217- #endif
22182205 }
22192206
22202207 private void OnMiddleClickCallback ( InputAction . CallbackContext context )
@@ -2229,9 +2216,7 @@ private void OnMiddleClickCallback(InputAction.CallbackContext context)
22292216 state . changedThisFrame = true ;
22302217 if ( IgnoreNextClick ( ref context , wasPressed ) )
22312218 state . middleButton . ignoreNextClick = true ;
2232- #if UNITY_2022_3_OR_NEWER
22332219 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
2234- #endif
22352220 }
22362221
22372222 private bool CheckForRemovedDevice ( ref InputAction . CallbackContext context )
@@ -2261,9 +2246,7 @@ private void OnScrollCallback(InputAction.CallbackContext context)
22612246 // ISXB-704: convert input value to BaseInputModule convention.
22622247 state . scrollDelta = ( scrollDelta / InputSystem . scrollWheelDeltaPerTick ) * scrollDeltaPerTick ;
22632248
2264- #if UNITY_2022_3_OR_NEWER
22652249 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
2266- #endif
22672250 }
22682251
22692252 private void OnMoveCallback ( InputAction . CallbackContext context )
@@ -2286,9 +2269,7 @@ private void OnTrackedDeviceOrientationCallback(InputAction.CallbackContext cont
22862269
22872270 ref var state = ref GetPointerStateForIndex ( index ) ;
22882271 state . worldOrientation = context . ReadValue < Quaternion > ( ) ;
2289- #if UNITY_2022_3_OR_NEWER
22902272 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
2291- #endif
22922273 }
22932274
22942275 private void OnTrackedDevicePositionCallback ( InputAction . CallbackContext context )
@@ -2299,9 +2280,7 @@ private void OnTrackedDevicePositionCallback(InputAction.CallbackContext context
22992280
23002281 ref var state = ref GetPointerStateForIndex ( index ) ;
23012282 state . worldPosition = context . ReadValue < Vector3 > ( ) ;
2302- #if UNITY_2022_3_OR_NEWER
23032283 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
2304- #endif
23052284 }
23062285
23072286 private void OnControlsChanged ( object obj )
0 commit comments