示例#1
0
        /// <summary>
        /// Hides the UI and stops the search for devices.
        /// </summary>
        public void Hide()
        {
            ToggleLockScreen(false);

            _wearableControl.StopSearchingForDevices();

            _isVisible      = false;
            _canvas.enabled = false;
            video.SetActive(true);
            cam.SetActive(true);
            cam1.SetActive(false);
            _canvasGroup.alpha = 0f;
            if (_userDidOpen)
            {
                var connectionResult = _wearableControl.ConnectedDevice.HasValue
                                        ? WearableConnectUIResult.Successful
                                        : WearableConnectUIResult.Cancelled;
                ToggleLockScreen(false);
                if (Closed != null)
                {
                    Closed.Invoke(connectionResult);
                }
            }

            _userDidOpen = false;
        }
示例#2
0
        /// <summary>
        /// Hides the UI and stops the search for devices.
        /// </summary>
        public void Hide()
        {
            _canvas.enabled    = false;
            _canvasGroup.alpha = 0f;

            _wearableControl.StopSearchingForDevices();

            ToggleLockScreen(false);

            if (_onClose != null)
            {
                _onClose();
            }

            _onClose = null;
        }