/// <summary>
        /// Initialize the mouse pointer
        /// </summary>
        private void CreateSource()
        {
            if (CoreServices.InputSystem == null || Controller != null)
            {
                return;
            }

            Controller = CreateController();
            CoreServices.InputSystem.RaiseSourceDetected(Controller.InputSource, Controller);
        }
        /// <summary>
        /// Destroy the mouse pointer
        /// </summary>
        private void DestroySource()
        {
            if (Controller == null)
            {
                return;
            }

            var oldController = Controller;

            Controller = null;
            CoreServices.InputSystem?.RaiseSourceLost(oldController.InputSource, oldController);
        }
        /// <summary>
        /// Create a new mouse controller.
        /// </summary>
        private UnityMouseController CreateController()
        {
            IMixedRealityInputSource mouseInputSource = null;
            UnityMouseController     mouseController  = null;

            var pointers = RequestPointers(SupportedControllerType.Mouse, Handedness.None);

            mouseInputSource = CoreServices.InputSystem.RequestNewGenericInputSource("Mouse Input", pointers);
            mouseController  = new UnityMouseController(TrackingState.NotApplicable, Handedness.None, mouseInputSource);

            for (int i = 0; i < mouseInputSource.Pointers.Length; i++)
            {
                mouseInputSource.Pointers[i].Controller = mouseController;
            }

            return(mouseController);
        }