-
Notifications
You must be signed in to change notification settings - Fork 329
CHANGE: Remove code that supported Unity versions older than 2022 LTS #2274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
4498f06
77410be
926589a
fe900b3
fda63bc
30eb8e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -587,26 +587,26 @@ protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRota | |
| var positionValid = m_IgnoreTrackingState || (m_CurrentTrackingState & TrackingStates.Position) != 0; | ||
| var rotationValid = m_IgnoreTrackingState || (m_CurrentTrackingState & TrackingStates.Rotation) != 0; | ||
|
|
||
| #if HAS_SET_LOCAL_POSITION_AND_ROTATION | ||
| if (m_TrackingType == TrackingType.RotationAndPosition && rotationValid && positionValid) | ||
| switch (m_TrackingType) | ||
| { | ||
| transform.SetLocalPositionAndRotation(newPosition, newRotation); | ||
| return; | ||
| } | ||
| #endif | ||
|
|
||
| if (rotationValid && | ||
| (m_TrackingType == TrackingType.RotationAndPosition || | ||
| m_TrackingType == TrackingType.RotationOnly)) | ||
| { | ||
| transform.localRotation = newRotation; | ||
| } | ||
|
|
||
| if (positionValid && | ||
| (m_TrackingType == TrackingType.RotationAndPosition || | ||
| m_TrackingType == TrackingType.PositionOnly)) | ||
| { | ||
| transform.localPosition = newPosition; | ||
| case TrackingType.RotationAndPosition: | ||
| if (rotationValid && positionValid) | ||
| transform.SetLocalPositionAndRotation(newPosition, newRotation); | ||
| else if (rotationValid) | ||
| transform.localRotation = newRotation; | ||
| else if (positionValid) | ||
| transform.localPosition = newPosition; | ||
| break; | ||
|
|
||
| case TrackingType.PositionOnly: | ||
| if (positionValid) | ||
| transform.localPosition = newPosition; | ||
| break; | ||
|
|
||
| case TrackingType.RotationOnly: | ||
| if (rotationValid) | ||
| transform.localRotation = newRotation; | ||
| break; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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+ |
||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -450,18 +450,6 @@ public static void Initialize() | |
| .WithProduct("^(Oculus Tracked Remote)")); | ||
| #endif | ||
|
|
||
| // Built-in layouts replaced by the com.unity.xr.googlevr package. | ||
| #if !DISABLE_BUILTIN_INPUT_SYSTEM_GOOGLEVR | ||
| InputSystem.RegisterLayout<Unity.XR.GoogleVr.DaydreamHMD>( | ||
| matches: new InputDeviceMatcher() | ||
| .WithInterface(XRUtilities.InterfaceMatchAnyVersion) | ||
| .WithProduct("Daydream HMD")); | ||
| InputSystem.RegisterLayout<Unity.XR.GoogleVr.DaydreamController>( | ||
| matches: new InputDeviceMatcher() | ||
| .WithInterface(XRUtilities.InterfaceMatchAnyVersion) | ||
| .WithProduct("^(Daydream Controller)")); | ||
| #endif | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| // Built-in layouts replaced by the com.unity.xr.openvr package. | ||
| #if !DISABLE_BUILTIN_INPUT_SYSTEM_OPENVR | ||
| InputSystem.RegisterLayout<Unity.XR.OpenVR.OpenVRHMD>( | ||
|
|
||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekcoh would know better