File tree Expand file tree Collapse file tree 1 file changed +4
-18
lines changed
Assets/MixedRealityToolkit-SDK/Features/Input Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -242,16 +242,9 @@ private void Awake()
242242 RegisterPointer ( inputSource . Pointers [ i ] ) ;
243243
244244 // Special Registration for Gaze
245- if ( inputSource . SourceId == InputSystem . GazeProvider . GazeInputSource . SourceId )
245+ if ( inputSource . SourceId == InputSystem . GazeProvider . GazeInputSource . SourceId && gazeProviderPointingData == null )
246246 {
247- Debug . Assert ( gazeProviderPointingData == null , "Gaze Provider Pointer Data was already registered!" ) ;
248-
249- if ( gazeProviderPointingData == null )
250- {
251- gazeProviderPointingData = new PointerData ( inputSource . Pointers [ i ] ) ;
252- }
253-
254- Debug . Assert ( gazeProviderPointingData != null ) ;
247+ gazeProviderPointingData = new PointerData ( inputSource . Pointers [ i ] ) ;
255248 }
256249 }
257250 }
@@ -850,16 +843,9 @@ public void OnSourceDetected(SourceStateEventData eventData)
850843 RegisterPointer ( eventData . InputSource . Pointers [ i ] ) ;
851844
852845 // Special Registration for Gaze
853- if ( eventData . InputSource . SourceId == InputSystem . GazeProvider . GazeInputSource . SourceId )
846+ if ( eventData . InputSource . SourceId == InputSystem . GazeProvider . GazeInputSource . SourceId && gazeProviderPointingData == null )
854847 {
855- Debug . Assert ( gazeProviderPointingData == null , "Gaze Provider Pointer Data was already registered!" ) ;
856-
857- if ( gazeProviderPointingData == null )
858- {
859- gazeProviderPointingData = new PointerData ( eventData . InputSource . Pointers [ i ] ) ;
860- }
861-
862- Debug . Assert ( gazeProviderPointingData != null ) ;
848+ gazeProviderPointingData = new PointerData ( eventData . InputSource . Pointers [ i ] ) ;
863849 }
864850 }
865851 }
You can’t perform that action at this time.
0 commit comments