@@ -61,8 +61,6 @@ public class TrajectoryPlannerManager : MonoBehaviour
6161#if UNITY_WEBGL && ! UNITY_EDITOR
6262 [ DllImport ( "__Internal" ) ]
6363 private static extern void Copy2Clipboard ( string str ) ;
64-
65- WebGLInput . captureAllKeyboardInput = true ;
6664#endif
6765
6866 #region Events
@@ -154,6 +152,10 @@ public void SetProbeControl(bool state)
154152 #region Unity
155153 private void Awake ( )
156154 {
155+ #if UNITY_WEBGL && ! UNITY_EDITOR
156+ WebGLInput . captureAllKeyboardInput = true ;
157+ #endif
158+
157159 SetProbeControl ( false ) ;
158160
159161 // Deal with coordinate spaces and transforms
@@ -288,7 +290,7 @@ public void SetMovedThisFrame()
288290 _movedThisFrame = true ;
289291 }
290292
291- #endregion
293+ #endregion
292294
293295 public Task GetAnnotationDatasetLoadedTask ( )
294296 {
@@ -402,7 +404,7 @@ private void RecoverActiveProbeController()
402404 _restoredProbe = true ;
403405 }
404406
405- #region Add Probe Functions
407+ #region Add Probe Functions
406408
407409 /// <summary>
408410 /// Used in the editor when the add probe buttons are clicked in the scene
@@ -491,7 +493,7 @@ public void CopyActiveProbe()
491493 AddNewProbe ( ProbeManager . ActiveProbeManager . ProbeType , ProbeManager . ActiveProbeManager . ProbeController . Insertion ) ;
492494 }
493495
494- #endregion
496+ #endregion
495497
496498 private void CountProbePanels ( )
497499 {
@@ -640,7 +642,7 @@ public void LockActiveProbe(bool locked)
640642 ProbeManager . ActiveProbeManager . SetLock ( locked ) ;
641643 }
642644
643- #region Warping
645+ #region Warping
644646
645647 public void WarpBrain ( )
646648 {
@@ -667,9 +669,9 @@ public void UnwarpBrain()
667669
668670
669671
670- #endregion
672+ #endregion
671673
672- #region Colliders
674+ #region Colliders
673675
674676 public void UpdateRigColliders ( IEnumerable < Collider > newRigColliders , bool keep )
675677 {
@@ -680,7 +682,7 @@ public void UpdateRigColliders(IEnumerable<Collider> newRigColliders, bool keep)
680682 rigColliders . Remove ( collider ) ;
681683 }
682684
683- #endregion
685+ #endregion
684686
685687 public void UpdateAllProbeUI ( )
686688 {
@@ -699,7 +701,7 @@ public void UpdateAllProbePositions()
699701 ///
700702
701703
702- #region Settings
704+ #region Settings
703705
704706 public void SetGhostAreaVisibility ( )
705707 {
@@ -763,9 +765,9 @@ public void InVivoTransformChanged(int invivoOption)
763765 UpdateAllProbeUI ( ) ;
764766 }
765767
766- #endregion
768+ #endregion
767769
768- #region Setting Helper Functions
770+ #region Setting Helper Functions
769771
770772
771773 public void SetSurfaceDebugActive ( bool active )
@@ -776,7 +778,7 @@ public void SetSurfaceDebugActive(bool active)
776778 _surfaceDebugGo . SetActive ( false ) ;
777779 }
778780
779- #endregion
781+ #endregion
780782
781783
782784
@@ -833,7 +835,7 @@ public void SetSurfaceDebugPosition(Vector3 worldPosition)
833835 _surfaceDebugGo . transform . position = worldPosition ;
834836 }
835837
836- #region Save and load probes on quit
838+ #region Save and load probes on quit
837839
838840 private void OnApplicationQuit ( )
839841 {
0 commit comments