private static void doVariousThingsForHeadsetBeingWorn() { if (Headset.isApparentlyBeingWorn) { if (MoonMotionProjectMenubar.doTabToGameWhileHeadsetIsWorn) { TabTo.game(); } if (UnityIs.notPlaying && MoonMotionProjectMenubar.doPlayWhileHeadsetIsWorn) { Play.editor(); } } }
private static void doVariousThingsForHeadsetUnwearing() { if (headsetApparentlyBeingWornPreviously && Headset.isApparentlyNotBeingWorn) { if (MoonMotionProjectMenubar.doTabToSceneUponHeadsetUnwearing) { TabTo.scene(); // give this a chance to execute first } if (UnityIs.playing && MoonMotionProjectMenubar.doPauseIfPlayingUponHeadsetUnwearing) { Pause.editor(); } } headsetApparentlyBeingWornPreviously = Headset.isApparentlyBeingWorn; }