-
Notifications
You must be signed in to change notification settings - Fork 328
FIX: Removing dependencies on VRModule #2251
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
Changes from all commits
751b6af
db1e773
ca5f257
c1f3927
83cd60a
0ba6efe
0b42788
c4c0f88
2c294af
ed0465b
ce9bf10
20c1a65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -418,16 +418,6 @@ protected void Reset() | |
/// </summary> | ||
protected virtual void Awake() | ||
{ | ||
#if UNITY_INPUT_SYSTEM_ENABLE_VR && ENABLE_VR | ||
if (HasStereoCamera(out var cameraComponent)) | ||
{ | ||
// The Unity 6.4+ replacement for this call has to be figured later | ||
// See https://jira.unity3d.com/browse/XR-7591 | ||
#pragma warning disable CS0618 | ||
UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(cameraComponent, true); | ||
#pragma warning restore CS0618 | ||
} | ||
#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. Nice. Can we remove the now empty Awake and OnDestroy as well? Thanks 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. No because they are 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. I had tried to remove the methods and it got caught against CI. Unfortunately, we have to leave in the empty methods for now. 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. I thought those Awake/Start/etc were the MonoBehaviour magic methods that are invoked by name from the native code if present, it didn't matter whether they were public, private, virtual or not. But ok, let it be for now. |
||
|
||
/// <summary> | ||
|
@@ -459,16 +449,6 @@ protected void OnDisable() | |
/// </summary> | ||
protected virtual void OnDestroy() | ||
{ | ||
#if UNITY_INPUT_SYSTEM_ENABLE_VR && ENABLE_VR | ||
if (HasStereoCamera(out var cameraComponent)) | ||
{ | ||
// The Unity 6.4+ replacement for this call has to be figured later | ||
// See https://jira.unity3d.com/browse/XR-7591 | ||
#pragma warning disable CS0618 | ||
UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(cameraComponent, false); | ||
#pragma warning restore CS0618 | ||
} | ||
#endif | ||
} | ||
|
||
/// <summary> | ||
|
@@ -630,11 +610,6 @@ protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRota | |
} | ||
} | ||
|
||
bool HasStereoCamera(out Camera cameraComponent) | ||
{ | ||
return TryGetComponent(out cameraComponent) && cameraComponent.stereoEnabled; | ||
} | ||
|
||
// Evaluates whether the given action has at least one resolved control and may generate input. | ||
private static bool HasResolvedControl(InputAction action) | ||
{ | ||
|
Uh oh!
There was an error while loading. Please reload this page.