Skip to content

Conversation

@K-Tone
Copy link
Collaborator

@K-Tone K-Tone commented Oct 28, 2025

Description

Unity 2021.3 LTS is oldest Unity version that is supported at this moment, yet we still have some code lying around that deals with older versions such as 2020 and so. We're removing this code in this PR.

Testing status & QA

Local complication, no functional changes intended.

Overall Product Risks

  • Complexity: Low
  • Halo Effect: Low

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

@K-Tone K-Tone changed the title Anthony/remove code targeting 2021.2 and older CHANGE: Remove code to support Unity versions older than 2021.3 Oct 28, 2025
@K-Tone
Copy link
Collaborator Author

K-Tone commented Oct 28, 2025

CC @Pauliusd01 -- not sure you want to test this change, there should be no functionality changes. Mentioning you here just for viz.

@K-Tone K-Tone marked this pull request as ready for review October 28, 2025 11:11
@u-pr-agent
Copy link
Contributor

u-pr-agent bot commented Oct 28, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪

The PR consists of many small, repetitive changes across multiple files, primarily removing conditional compilation directives, making it straightforward to review despite its size.
🏅 Score: 85

The PR effectively cleans up legacy code for older Unity versions, but it may introduce a compilation error by removing a necessary version check for `BuildTarget.QNX`.
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Potential Build Error

The conditional compilation directive for BuildTarget.QNX has been removed. Since BuildTarget.QNX was introduced in Unity 2022.1, this change may cause compilation failures on the stated minimum supported version, Unity 2021.3 LTS.

BuildTarget.QNX,

🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent

Comment on lines 38 to 43
BuildTarget.LinuxHeadlessSimulation,
BuildTarget.EmbeddedLinux,
#if UNITY_2022_1_OR_NEWER
BuildTarget.QNX,
#endif
#if UNITY_2022_3_OR_NEWER
BuildTarget.VisionOS,
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The conditional compilation directive for BuildTarget.QNX was removed, but it should be restored. The minimum supported Unity version for this package is now 2021.3, but BuildTarget.QNX was only introduced in Unity 2022.1. Without the conditional compilation, this code will fail to compile on Unity 2021.3. [possible issue, importance: 9]

Suggested change
BuildTarget.LinuxHeadlessSimulation,
BuildTarget.EmbeddedLinux,
#if UNITY_2022_1_OR_NEWER
BuildTarget.QNX,
#endif
#if UNITY_2022_3_OR_NEWER
BuildTarget.VisionOS,
#endif
BuildTarget.LinuxHeadlessSimulation,
BuildTarget.EmbeddedLinux,
#if UNITY_2022_1_OR_NEWER
BuildTarget.QNX,
#endif
#if UNITY_2022_3_OR_NEWER
BuildTarget.VisionOS,
#endif

🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed that up

@codecov-github-com
Copy link

codecov-github-com bot commented Oct 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop    #2267      +/-   ##
===========================================
+ Coverage    76.70%   76.81%   +0.10%     
===========================================
  Files          465      476      +11     
  Lines        87919    88645     +726     
===========================================
+ Hits         67442    68093     +651     
- Misses       20477    20552      +75     
Flag Coverage Δ
inputsystem_MacOS_2021.3 5.93% <ø> (+0.02%) ⬆️
inputsystem_MacOS_2022.3 5.39% <ø> (+0.02%) ⬆️
inputsystem_MacOS_2022.3_project 74.74% <ø> (+0.15%) ⬆️
inputsystem_MacOS_6000.0 5.18% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.0_project 76.60% <ø> (+0.09%) ⬆️
inputsystem_MacOS_6000.2 5.18% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.2_project 76.60% <ø> (+0.09%) ⬆️
inputsystem_MacOS_6000.3 5.18% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.3_project 76.60% <ø> (+0.10%) ⬆️
inputsystem_MacOS_6000.4 5.19% <ø> (+<0.01%) ⬆️
inputsystem_MacOS_6000.4_project 76.61% <ø> (+0.10%) ⬆️
inputsystem_MacOS_6000.5 5.19% <ø> (?)
inputsystem_MacOS_6000.5_project 76.61% <ø> (?)
inputsystem_Ubuntu_2021.3 5.94% <ø> (+0.02%) ⬆️
inputsystem_Ubuntu_2022.3 5.40% <ø> (+0.02%) ⬆️
inputsystem_Ubuntu_2022.3_project 74.54% <ø> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.0 5.19% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0_project 76.40% <ø> (+0.08%) ⬆️
inputsystem_Ubuntu_6000.2 5.19% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.2_project 76.40% <ø> (+0.08%) ⬆️
inputsystem_Ubuntu_6000.3 5.19% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3_project 76.41% <ø> (+0.09%) ⬆️
inputsystem_Ubuntu_6000.4 5.19% <ø> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.4_project 76.41% <ø> (+0.08%) ⬆️
inputsystem_Ubuntu_6000.5 5.19% <ø> (?)
inputsystem_Ubuntu_6000.5_project 76.41% <ø> (?)
inputsystem_Windows_2021.3 5.93% <ø> (+0.02%) ⬆️
inputsystem_Windows_2022.3 5.39% <ø> (+0.02%) ⬆️
inputsystem_Windows_2022.3_project 74.87% <ø> (+0.14%) ⬆️
inputsystem_Windows_6000.0 5.18% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 76.72% <ø> (+0.07%) ⬆️
inputsystem_Windows_6000.2 5.18% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.2_project 76.72% <ø> (+0.08%) ⬆️
inputsystem_Windows_6000.3 5.18% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 76.72% <ø> (+0.07%) ⬆️
inputsystem_Windows_6000.4 5.19% <ø> (+<0.01%) ⬆️
inputsystem_Windows_6000.4_project 76.73% <ø> (+0.08%) ⬆️
inputsystem_Windows_6000.5 5.19% <ø> (?)
inputsystem_Windows_6000.5_project 76.73% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...tem/InputSystem/Controls/InputControlExtensions.cs 77.02% <ø> (+1.12%) ⬆️
...utsystem/InputSystem/Devices/InputDeviceBuilder.cs 95.57% <ø> (ø)
...tem/Editor/AssetImporter/InputActionAssetEditor.cs 80.00% <ø> (+0.79%) ⬆️
...System/Editor/AssetImporter/InputActionImporter.cs 57.65% <ø> (+7.89%) ⬆️
.../Editor/AssetImporter/InputActionImporterEditor.cs 0.00% <ø> (ø)
...System/Editor/DeviceSimulator/InputSystemPlugin.cs 66.66% <ø> (ø)
...em/InputSystem/Editor/InputSystemPackageControl.cs 50.00% <ø> (ø)
...tem/InputSystem/Editor/InputSystemPluginControl.cs 0.00% <ø> (ø)
...ystem/InputSystem/Editor/Internal/EditorHelpers.cs 62.06% <ø> (ø)
...itor/ProjectWideActions/ProjectWideActionsAsset.cs 49.04% <ø> (ø)
... and 6 more

... and 20 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this clean-up. Did you also look at .asmdef files to remove any symbols indirectly mapping to older than 2021.3?

@K-Tone
Copy link
Collaborator Author

K-Tone commented Oct 28, 2025

Thanks for doing this clean-up. Did you also look at .asmdef files to remove any symbols indirectly mapping to older than 2021.3?

Yes, it didn't appear to me like we had anything. 2021.3 is there in a few spots though -- good to keep it in mind next time we clean up 2021.3.

@K-Tone K-Tone merged commit 24ad8c3 into develop Oct 28, 2025
130 checks passed
@K-Tone K-Tone deleted the anthony/remove-code-targeting-2021.2-and-older branch October 28, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants