Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit b4413cb

Browse files
authored
Update WebXRCamera.cs
1 parent 4720105 commit b4413cb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Assets/WebXR/Scripts/WebXRCamera.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ void OnEnable()
3333

3434
cameraMain.transform.localPosition = new Vector3(0, WebXRManager.Instance.DefaultHeight, 0);
3535

36-
#if UNITY_EDITOR
37-
// No editor specific funtionality
38-
#elif UNITY_WEBGL
39-
postRenderCoroutine = StartCoroutine(endOfFrame());
40-
#endif
36+
#if UNITY_EDITOR
37+
// No editor specific funtionality
38+
#elif UNITY_WEBGL
39+
postRenderCoroutine = StartCoroutine(endOfFrame());
40+
#endif
4141
}
4242

4343
private void OnDisable()
@@ -81,7 +81,7 @@ private void onHeadsetUpdate(
8181
cameraR.projectionMatrix = rightProjectionMatrix;
8282
}
8383
}
84-
84+
#if UNITY_EDITOR || !UNITY_WEBGL
8585
//Update Camera position according to Unity XR, if not using WebGL
8686
private void Update()
8787
{
@@ -110,5 +110,5 @@ private void Update()
110110
}
111111
}
112112
}
113-
114-
}
113+
#endif
114+
}

0 commit comments

Comments
 (0)