Skip to content

Commit 4498f06

Browse files
committed
remove direct mentions of pre 2022.3 lts stuff
1 parent 4cf845c commit 4498f06

File tree

4 files changed

+1
-51
lines changed

4 files changed

+1
-51
lines changed

Packages/com.unity.inputsystem/InputSystem/Editor/InputSystemPluginControl.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@ private static void CheckForExtension()
3737
BuildTarget.tvOS,
3838
BuildTarget.LinuxHeadlessSimulation,
3939
BuildTarget.EmbeddedLinux,
40-
#if UNITY_2022_1_OR_NEWER
4140
BuildTarget.QNX,
42-
#endif
43-
#if UNITY_2022_3_OR_NEWER
4441
BuildTarget.VisionOS,
45-
#endif
4642
(BuildTarget)49,
4743
BuildTarget.NoTarget
4844
};

Packages/com.unity.inputsystem/InputSystem/Plugins/UI/ExtendedPointerEventData.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ public override string ToString()
9494
stringBuilder.AppendLine("azimuthAngle: " + azimuthAngle);
9595
stringBuilder.AppendLine("altitudeAngle: " + altitudeAngle);
9696
stringBuilder.AppendLine("twist: " + twist);
97-
#if UNITY_2022_3_OR_NEWER
9897
stringBuilder.AppendLine("displayIndex: " + displayIndex);
99-
#endif
10098
return stringBuilder.ToString();
10199
}
102100

@@ -138,27 +136,21 @@ internal void ReadDeviceState()
138136
azimuthAngle = (pen.tilt.value.x + 1) * Mathf.PI / 2;
139137
altitudeAngle = (pen.tilt.value.y + 1) * Mathf.PI / 2;
140138
twist = pen.twist.value * Mathf.PI * 2;
141-
#if UNITY_2022_3_OR_NEWER
142139
displayIndex = pen.displayIndex.ReadValue();
143-
#endif
144140
}
145141
else if (control.parent is TouchControl touchControl)
146142
{
147143
uiToolkitPointerId = GetTouchPointerId(touchControl);
148144
pressure = touchControl.pressure.magnitude;
149145
radius = touchControl.radius.value;
150-
#if UNITY_2022_3_OR_NEWER
151146
displayIndex = touchControl.displayIndex.ReadValue();
152-
#endif
153147
}
154148
else if (control.parent is Touchscreen touchscreen)
155149
{
156150
uiToolkitPointerId = GetTouchPointerId(touchscreen.primaryTouch);
157151
pressure = touchscreen.pressure.magnitude;
158152
radius = touchscreen.radius.value;
159-
#if UNITY_2022_3_OR_NEWER
160153
displayIndex = touchscreen.displayIndex.ReadValue();
161-
#endif
162154
}
163155
else
164156
{

Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XboxGamepadMacOS.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,6 @@ public enum Button
127127
RightThumbstickPress = 15,
128128
}
129129

130-
// IL2CPP on 2021 doesn't respect the FieldOffsets - as such, we need some padding fields
131-
#if UNITY_2021 && ENABLE_IL2CPP
132-
[FieldOffset(0)]
133-
private uint padding;
134-
#endif
135-
136130
[InputControl(name = "buttonSouth", bit = (uint)Button.A, displayName = "A")]
137131
[InputControl(name = "buttonEast", bit = (uint)Button.B, displayName = "B")]
138132
[InputControl(name = "buttonWest", bit = (uint)Button.X, displayName = "X")]
@@ -154,20 +148,9 @@ public enum Button
154148
[InputControl(name = "leftTrigger", format = "BYTE")]
155149
[FieldOffset(6)] public byte leftTrigger;
156150

157-
#if UNITY_2021 && ENABLE_IL2CPP
158-
[FieldOffset(7)]
159-
private byte triggerPadding;
160-
#endif
161-
162151
[InputControl(name = "rightTrigger", format = "BYTE")]
163152
[FieldOffset(8)] public byte rightTrigger;
164153

165-
#if UNITY_2021 && ENABLE_IL2CPP
166-
[FieldOffset(9)]
167-
private byte triggerPadding2;
168-
#endif
169-
170-
171154
[InputControl(name = "leftStick", layout = "Stick", format = "VC2S")]
172155
[InputControl(name = "leftStick/x", offset = 0, format = "SHRT", parameters = "")]
173156
[InputControl(name = "leftStick/left", offset = 0, format = "SHRT", parameters = "")]

0 commit comments

Comments
 (0)