Пример #1
0
 void OnDestroy()
 {
     MLHands.Stop();
     MLInput.Stop();
     MLWorldPlanes.Stop();
     MLWorldRays.Stop();
 }
Пример #2
0
 /// <summary>
 /// Stops the communication to the MLHands API.
 /// </summary>
 void OnDestroy()
 {
     if (MLHands.IsStarted)
     {
         MLHands.Stop();
     }
 }
Пример #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();
     }
 }
Пример #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();
     }
 }
Пример #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();
 }
Пример #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();
            }
        }
Пример #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();
        }
Пример #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();
        }
Пример #10
0
 private void OnDisable()
 {
     MLHands.KeyPoseManager.OnHandKeyPoseBegin -= OnHandKeyPoseBegin;
     MLHands.KeyPoseManager.OnHandKeyPoseEnd   -= OnHandKeyPoseEnd;
     MLHands.Stop();
 }
Пример #11
0
 private void OnDestroy()
 {
     MLHands.Stop();
 }
Пример #12
0
 private void OnDisable()
 {
     MLHands.Stop();
 }
Пример #13
0
 private void OnDestroy()//disable hand posing before app ends
 {
     MLHands.Stop();
 }
Пример #14
0
 void onDestroy()
 {
     MLHands.Stop();
 }
Пример #15
0
 

 void OnDestroy()
 {
     
 MLHands.Stop(); 

 }