@@ -1737,7 +1737,7 @@ private int GetPointerStateIndexFor(InputControl control, bool createIfNotExists
17371737 eventData . pointerType = pointerType ;
17381738 eventData . pointerId = pointerId ;
17391739 eventData . touchId = touchId ;
1740- #if UNITY_2023_1_OR_NEWER
1740+ #if UNITY_2022_3_OR_NEWER
17411741 eventData . displayIndex = displayIndex ;
17421742#endif
17431743
@@ -1833,7 +1833,7 @@ private int AllocatePointer(int pointerId, int displayIndex, int touchId, UIPoin
18331833 eventData = new ExtendedPointerEventData ( eventSystem ) ;
18341834
18351835 eventData . pointerId = pointerId ;
1836- #if UNITY_2023_1_OR_NEWER
1836+ #if UNITY_2022_3_OR_NEWER
18371837 eventData . displayIndex = displayIndex ;
18381838#endif
18391839 eventData . touchId = touchId ;
@@ -1959,7 +1959,7 @@ private void OnPointCallback(InputAction.CallbackContext context)
19591959
19601960 ref var state = ref GetPointerStateForIndex ( index ) ;
19611961 state . screenPosition = context . ReadValue < Vector2 > ( ) ;
1962- #if UNITY_2023_1_OR_NEWER
1962+ #if UNITY_2022_3_OR_NEWER
19631963 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
19641964#endif
19651965 }
@@ -1990,7 +1990,7 @@ private void OnLeftClickCallback(InputAction.CallbackContext context)
19901990 state . changedThisFrame = true ;
19911991 if ( IgnoreNextClick ( ref context , wasPressed ) )
19921992 state . leftButton . ignoreNextClick = true ;
1993- #if UNITY_2023_1_OR_NEWER
1993+ #if UNITY_2022_3_OR_NEWER
19941994 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
19951995#endif
19961996 }
@@ -2007,7 +2007,7 @@ private void OnRightClickCallback(InputAction.CallbackContext context)
20072007 state . changedThisFrame = true ;
20082008 if ( IgnoreNextClick ( ref context , wasPressed ) )
20092009 state . rightButton . ignoreNextClick = true ;
2010- #if UNITY_2023_1_OR_NEWER
2010+ #if UNITY_2022_3_OR_NEWER
20112011 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
20122012#endif
20132013 }
@@ -2024,7 +2024,7 @@ private void OnMiddleClickCallback(InputAction.CallbackContext context)
20242024 state . changedThisFrame = true ;
20252025 if ( IgnoreNextClick ( ref context , wasPressed ) )
20262026 state . middleButton . ignoreNextClick = true ;
2027- #if UNITY_2023_1_OR_NEWER
2027+ #if UNITY_2022_3_OR_NEWER
20282028 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
20292029#endif
20302030 }
@@ -2055,7 +2055,7 @@ private void OnScrollCallback(InputAction.CallbackContext context)
20552055 // The old input system reported scroll deltas in lines, we report pixels.
20562056 // Need to scale as the UI system expects lines.
20572057 state . scrollDelta = context . ReadValue < Vector2 > ( ) * ( 1 / kPixelPerLine ) ;
2058- #if UNITY_2023_1_OR_NEWER
2058+ #if UNITY_2022_3_OR_NEWER
20592059 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
20602060#endif
20612061 }
@@ -2074,7 +2074,7 @@ private void OnTrackedDeviceOrientationCallback(InputAction.CallbackContext cont
20742074
20752075 ref var state = ref GetPointerStateForIndex ( index ) ;
20762076 state . worldOrientation = context . ReadValue < Quaternion > ( ) ;
2077- #if UNITY_2023_1_OR_NEWER
2077+ #if UNITY_2022_3_OR_NEWER
20782078 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
20792079#endif
20802080 }
@@ -2087,7 +2087,7 @@ private void OnTrackedDevicePositionCallback(InputAction.CallbackContext context
20872087
20882088 ref var state = ref GetPointerStateForIndex ( index ) ;
20892089 state . worldPosition = context . ReadValue < Vector3 > ( ) ;
2090- #if UNITY_2023_1_OR_NEWER
2090+ #if UNITY_2022_3_OR_NEWER
20912091 state . eventData . displayIndex = GetDisplayIndexFor ( context . control ) ;
20922092#endif
20932093 }
0 commit comments