Skip to content

Conversation

@K-Tone
Copy link
Collaborator

@K-Tone K-Tone commented Nov 5, 2025

Description

Removing mentions of Unity older than 2022 LTS from code and manifests.

Testing status & QA

Local complilation

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.

case TrackingType.RotationOnly:
if (rotationValid)
transform.localRotation = newRotation;
break;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This code is still logically the same as on the left, I just rephrased it to be more explicit in 2022 LTS+

matches: new InputDeviceMatcher()
.WithInterface(XRUtilities.InterfaceMatchAnyVersion)
.WithProduct("^(Daydream Controller)"));
#endif
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The reason I'm cutting this is that Daydream has been discontinued by Google in 2020

// Note that m_Quitting is used here to mitigate the problem reported in issue tracker:
// https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-10774.
// Enabling a device will call into IOCTL of backend which will (may) be destroyed prior
// to this callback on Unity version <= 2022.2. This is not a fix for the actual problem
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change is a rollback of 7d53de2, for which we hopefully have a native-side solution in 2022 LTS now

Copy link
Collaborator

Choose a reason for hiding this comment

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

How is that solved now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ekcoh would know better

@K-Tone K-Tone changed the title Anthony/retire unity older than 2022.3lts CHANGE: Remove code that supported Unity versions older than 2022 LTS Nov 5, 2025
@K-Tone K-Tone marked this pull request as ready for review November 5, 2025 10:47
@u-pr-agent
Copy link
Contributor

u-pr-agent bot commented Nov 5, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

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

The PR consists mainly of removing conditional compilation directives and obsolete code for older Unity versions, which is straightforward to verify.
🏅 Score: 95

The PR effectively removes obsolete code and workarounds for older Unity versions, significantly improving code clarity and maintainability.
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logic Refactor

The SetLocalTransform method has been refactored from a series of if statements to a switch statement. Please verify that the new logic correctly handles all cases of m_TrackingType and validity flags (positionValid, rotationValid), especially for the RotationAndPosition case where only one of them might be valid.

switch (m_TrackingType)
{
    case TrackingType.RotationAndPosition:
        if (rotationValid && positionValid)
            transform.SetLocalPositionAndRotation(newPosition, newRotation);
        else if (rotationValid)
            transform.localRotation = newRotation;
        else
            transform.localPosition = newPosition;
        break;

    case TrackingType.PositionOnly:
        if (positionValid)
            transform.localPosition = newPosition;
        break;

    case TrackingType.RotationOnly:
        if (rotationValid)
            transform.localRotation = newRotation;
        break;
}
  • Update review

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

@codecov-github-com
Copy link

codecov-github-com bot commented Nov 5, 2025

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...System/Editor/DeviceSimulator/InputSystemPlugin.cs 0.00% 1 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2274      +/-   ##
===========================================
+ Coverage    76.70%   76.84%   +0.13%     
===========================================
  Files          465      475      +10     
  Lines        87919    88672     +753     
===========================================
+ Hits         67442    68142     +700     
- Misses       20477    20530      +53     
Flag Coverage Δ
inputsystem_MacOS_2021.3 ?
inputsystem_MacOS_2021.3_project ?
inputsystem_MacOS_2022.3 ?
inputsystem_MacOS_2022.3_project 74.71% <93.33%> (+0.13%) ⬆️
inputsystem_MacOS_6000.0 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.0_project 76.63% <93.33%> (+0.12%) ⬆️
inputsystem_MacOS_6000.2 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.2_project 76.62% <93.33%> (+0.11%) ⬆️
inputsystem_MacOS_6000.3 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.3_project 76.62% <93.33%> (+0.12%) ⬆️
inputsystem_MacOS_6000.4 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.4_project 76.63% <93.33%> (+0.12%) ⬆️
inputsystem_MacOS_6000.5 5.18% <0.00%> (?)
inputsystem_MacOS_6000.5_project 76.63% <93.33%> (?)
inputsystem_Ubuntu_2021.3 ?
inputsystem_Ubuntu_2021.3_project ?
inputsystem_Ubuntu_2022.3 5.40% <0.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_2022.3_project 74.51% <93.33%> (+0.12%) ⬆️
inputsystem_Ubuntu_6000.0 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0_project 76.42% <93.33%> (+0.10%) ⬆️
inputsystem_Ubuntu_6000.2 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.2_project 76.42% <93.33%> (+0.10%) ⬆️
inputsystem_Ubuntu_6000.3 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3_project 76.42% <93.33%> (+0.10%) ⬆️
inputsystem_Ubuntu_6000.4 5.19% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.4_project 76.43% <93.33%> (+0.11%) ⬆️
inputsystem_Ubuntu_6000.5 5.19% <0.00%> (?)
inputsystem_Ubuntu_6000.5_project 76.43% <93.33%> (?)
inputsystem_Windows_2021.3 ?
inputsystem_Windows_2021.3_project ?
inputsystem_Windows_2022.3 5.39% <0.00%> (+0.02%) ⬆️
inputsystem_Windows_2022.3_project 74.84% <93.33%> (+0.11%) ⬆️
inputsystem_Windows_6000.0 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 76.75% <93.33%> (+0.10%) ⬆️
inputsystem_Windows_6000.2 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.2_project 76.74% <93.33%> (+0.10%) ⬆️
inputsystem_Windows_6000.3 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 76.74% <93.33%> (+0.10%) ⬆️
inputsystem_Windows_6000.4 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.4_project 76.75% <93.33%> (+0.10%) ⬆️
inputsystem_Windows_6000.5 5.18% <0.00%> (?)
linux_2021.3_pkg ?
linux_2021.3_project ?
linux_2022.3_pkg ?
linux_2022.3_project ?
linux_6000.0_pkg ?
linux_6000.0_project ?
linux_6000.1_pkg ?
linux_6000.1_project ?
linux_6000.2_pkg ?
linux_6000.2_project ?
linux_trunk_pkg ?
linux_trunk_project ?
mac_2021.3_pkg ?
mac_2021.3_project ?
mac_2022.3_pkg ?
mac_2022.3_project ?
mac_6000.0_pkg ?
mac_6000.0_project ?
mac_6000.1_pkg ?
mac_6000.1_project ?
mac_6000.2_pkg ?
mac_6000.2_project ?
mac_trunk_pkg ?
mac_trunk_project ?
win_2021.3_pkg ?
win_2021.3_project ?
win_2022.3_pkg ?
win_2022.3_project ?
win_6000.0_pkg ?
win_6000.0_project ?
win_6000.1_pkg ?
win_6000.1_project ?
win_6000.2_pkg ?
win_6000.2_project ?
win_trunk_pkg ?
win_trunk_project ?

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

Files with missing lines Coverage Δ
...tem/InputSystem/Editor/InputSystemPluginControl.cs 0.00% <ø> (ø)
...InputSystem/Plugins/UI/ExtendedPointerEventData.cs 67.90% <ø> (ø)
...InputSystem/Plugins/UI/InputSystemUIInputModule.cs 93.67% <ø> (+0.26%) ⬆️
...tem/InputSystem/Plugins/XInput/XboxGamepadMacOS.cs 73.68% <ø> (ø)
...system/InputSystem/Plugins/XR/TrackedPoseDriver.cs 87.01% <100.00%> (+1.64%) ⬆️
...ty.inputsystem/InputSystem/Plugins/XR/XRSupport.cs 40.62% <ø> (-1.22%) ⬇️
...System/Editor/DeviceSimulator/InputSystemPlugin.cs 69.09% <0.00%> (+2.42%) ⬆️

... and 32 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

@ritamerkl ritamerkl left a comment

Choose a reason for hiding this comment

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

Looks good to me. The only comment I have is about the m_Quitting - which is okay to remove if this is solved sufficiently elsewhere.

@K-Tone K-Tone force-pushed the anthony/retire-unity-older-than-2022.3lts branch from 60ad958 to 30eb8e6 Compare November 5, 2025 12:47
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.

3 participants