Skip to content

Commit

Permalink
Use desktop camera control script in Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
jakrams committed Feb 10, 2023
1 parent 6d5b73b commit 254e2b4
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Unity/Showcase/App/Assets/App/Utilities/CameraControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,6 @@ public Vector2 RotateSensitivity
#endregion Serialized Fields

#region MonoBehavior Functions
private void Awake()
{
// Destroy if editor, MRTK's input simulation will be used
// Destroy if using an XR device, camera moves with head.
bool isXrDevice = XRSettings.enabled &&
XRSettings.isDeviceActive &&
!string.IsNullOrEmpty(XRSettings.loadedDeviceName) &&
XRSettings.loadedDeviceName != "None";

if (Application.isEditor && !isXrDevice)
{
Component.DestroyImmediate(this);
}
}

void Update()
{
//
Expand Down

0 comments on commit 254e2b4

Please sign in to comment.