@@ -83,6 +83,9 @@ public bool Enabled
8383 set { enabled = value ; }
8484 }
8585
86+ /// <inheritdoc />
87+ public IMixedRealityInputSystem InputSystem { private get ; set ; }
88+
8689 /// <inheritdoc />
8790 public IMixedRealityInputSource GazeInputSource
8891 {
@@ -249,7 +252,7 @@ public override bool TryGetPointerRotation(out Quaternion rotation)
249252 /// <param name="inputSource"></param>
250253 public void RaisePointerDown ( MixedRealityInputAction mixedRealityInputAction , Handedness handedness = Handedness . None , IMixedRealityInputSource inputSource = null )
251254 {
252- MixedRealityToolkit . InputSystem . RaisePointerDown ( this , mixedRealityInputAction , handedness , inputSource ) ;
255+ gazeProvider . InputSystem ? . RaisePointerDown ( this , mixedRealityInputAction , handedness , inputSource ) ;
253256 }
254257
255258 /// <summary>
@@ -260,8 +263,8 @@ public void RaisePointerDown(MixedRealityInputAction mixedRealityInputAction, Ha
260263 /// <param name="inputSource"></param>
261264 public void RaisePointerUp ( MixedRealityInputAction mixedRealityInputAction , Handedness handedness = Handedness . None , IMixedRealityInputSource inputSource = null )
262265 {
263- MixedRealityToolkit . InputSystem . RaisePointerClicked ( this , mixedRealityInputAction , 0 , handedness , inputSource ) ;
264- MixedRealityToolkit . InputSystem . RaisePointerUp ( this , mixedRealityInputAction , handedness , inputSource ) ;
266+ gazeProvider . InputSystem ? . RaisePointerClicked ( this , mixedRealityInputAction , 0 , handedness , inputSource ) ;
267+ gazeProvider . InputSystem ? . RaisePointerUp ( this , mixedRealityInputAction , handedness , inputSource ) ;
265268 }
266269 }
267270
@@ -355,7 +358,7 @@ protected override void OnDisable()
355358 {
356359 base . OnDisable ( ) ;
357360 GazePointer . BaseCursor ? . SetVisibility ( false ) ;
358- MixedRealityToolkit . InputSystem ? . RaiseSourceLost ( GazeInputSource ) ;
361+ InputSystem ? . RaiseSourceLost ( GazeInputSource ) ;
359362 }
360363
361364 #endregion MonoBehaviour Implementation
@@ -407,12 +410,11 @@ private IMixedRealityPointer InitializeGazePointer()
407410
408411 gazePointer = new InternalGazePointer ( this , "Gaze Pointer" , null , raycastLayerMasks , maxGazeCollisionDistance , gazeTransform , stabilizer ) ;
409412
410- if ( GazeCursor == null &&
411- MixedRealityToolkit . Instance . ActiveProfile . InputSystemProfile != null &&
412- MixedRealityToolkit . Instance . ActiveProfile . InputSystemProfile . PointerProfile != null &&
413- MixedRealityToolkit . Instance . ActiveProfile . InputSystemProfile . PointerProfile . GazeCursorPrefab != null )
413+ if ( ( GazeCursor == null ) &&
414+ ( GazeCursorPrefab != null ) )
414415 {
415- var cursor = Instantiate ( GazeCursorPrefab , MixedRealityToolkit . Instance . MixedRealityPlayspace ) ;
416+ // todo: update....
417+ GameObject cursor = Instantiate ( GazeCursorPrefab , MixedRealityToolkit . Instance . MixedRealityPlayspace ) ;
416418 SetGazeCursor ( cursor ) ;
417419 }
418420
@@ -422,7 +424,7 @@ private IMixedRealityPointer InitializeGazePointer()
422424 private async void RaiseSourceDetected ( )
423425 {
424426 await WaitUntilInputSystemValid ;
425- MixedRealityToolkit . InputSystem . RaiseSourceDetected ( GazeInputSource ) ;
427+ InputSystem ? . RaiseSourceDetected ( GazeInputSource ) ;
426428 GazePointer . BaseCursor ? . SetVisibility ( true ) ;
427429 }
428430
0 commit comments