void OnDestroy()
 {
     MLHands.Stop();
     MLInput.Stop();
     MLWorldPlanes.Stop();
     MLWorldRays.Stop();
 }
 /// <summary>
 /// Stops the communication to the MLHands API.
 /// </summary>
 void OnDestroy()
 {
     if (MLHands.IsStarted)
     {
         MLHands.Stop();
     }
 }
Example #3
0
    // We stop the MLHands module given we no longer need it at this point. But before that, we unsubscribe from the events given we are no longer active at this moment.
    private void OnDisable()
    {
        MLHands.Right.OnKeyPoseBegin -= HandPoseReaction;
        MLHands.Left.OnKeyPoseBegin  -= HandPoseReaction;

        MLHands.Stop();
    }
 void OnDestroy()
 {
     if (MLHands.IsStarted)
     {
         MLHands.KeyPoseManager.DisableAllKeyPoses();
         MLHands.Stop();
     }
 }
Example #5
0
 /// <summary>
 /// Stops the communication to the MLHands API and unregisters required events.
 /// </summary>
 void OnDisable()
 {
     if (MLHands.IsStarted)
     {
         // Disable all KeyPoses if MLHands was started
         // and is about to stop
         UpdateKeyPoseStates(false);
         MLHands.Stop();
     }
 }
Example #6
0
 /// <summary>
 /// Stops the communication to the Gestures API and unregisters required events.
 /// </summary>
 void OnDisable()
 {
     if (MLHands.IsStarted)
     {
         // Disable all gestures if MLHands was started
         // and is about to stop
         UpdateGestureStates(false);
     }
     MLHands.Stop();
 }
Example #7
0
        private void StopMLInput()
        {
            if (MLHands.IsStarted)
            {
                // Stop KeyPose detection
                var keyPoseTypes = Enum.GetValues(typeof(MLHandKeyPose)).Cast <MLHandKeyPose>().ToArray();
                MLHands.KeyPoseManager.EnableKeyPoses(keyPoseTypes, false, true);

                MLHands.Stop();
            }
        }
Example #8
0
        /// <inheritdoc />
        public override void Disable()
        {
            MLInput.OnControllerConnected    -= OnControllerConnected;
            MLInput.OnControllerDisconnected -= OnControllerDisconnected;
            MLInput.OnControllerButtonDown   -= MlInputOnControllerButtonDown;
            MLInput.Stop();
            MLHands.Stop();

            foreach (var activeController in activeControllers)
            {
                RemoveController(activeController.Key, false);
            }

            activeControllers.Clear();
        }
Example #9
0
        /// <inheritdoc />
        public override void Disable()
        {
            MLInput.OnControllerConnected    -= OnControllerConnected;
            MLInput.OnControllerDisconnected -= OnControllerDisconnected;
            MLInput.OnControllerButtonDown   -= MlInputOnControllerButtonDown;
            MLInput.Stop();
            MLHands.Stop();

            foreach (var activeController in activeControllers)
            {
                var controller = GetController(activeController.Key, false);

                if (controller != null)
                {
                    MixedRealityToolkit.InputSystem?.RaiseSourceLost(controller.InputSource, controller);
                }
            }

            activeControllers.Clear();
        }
Example #10
0
 private void OnDisable()
 {
     MLHands.KeyPoseManager.OnHandKeyPoseBegin -= OnHandKeyPoseBegin;
     MLHands.KeyPoseManager.OnHandKeyPoseEnd   -= OnHandKeyPoseEnd;
     MLHands.Stop();
 }
Example #11
0
 private void OnDestroy()
 {
     MLHands.Stop();
 }
Example #12
0
 private void OnDisable()
 {
     MLHands.Stop();
 }
Example #13
0
 private void OnDestroy()//disable hand posing before app ends
 {
     MLHands.Stop();
 }
Example #14
0
 void onDestroy()
 {
     MLHands.Stop();
 }
Example #15
0
 

 void OnDestroy()
 {
     
 MLHands.Stop(); 

 }