Ejemplo n.º 1
0
 private static void doVariousThingsForHeadsetBeingWorn()
 {
     if (Headset.isApparentlyBeingWorn)
     {
         if (MoonMotionProjectMenubar.doTabToGameWhileHeadsetIsWorn)
         {
             TabTo.game();
         }
         if (UnityIs.notPlaying && MoonMotionProjectMenubar.doPlayWhileHeadsetIsWorn)
         {
             Play.editor();
         }
     }
 }
Ejemplo n.º 2
0
    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;
    }