File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Assets/MixedRealityToolkit-SDK/Features/Input Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,30 @@ private void Awake()
231231 "To create a UIRaycastCamera in your scene, find this Focus Provider GameObject and add one there." ) ;
232232 CreateUiRaycastCamera ( ) ;
233233 }
234+
235+ foreach ( var inputSource in InputSystem . DetectedInputSources )
236+ {
237+ // If our input source does not have any pointers, then skip.
238+ if ( inputSource . Pointers == null ) { return ; }
239+
240+ for ( var i = 0 ; i < inputSource . Pointers . Length ; i ++ )
241+ {
242+ RegisterPointer ( inputSource . Pointers [ i ] ) ;
243+
244+ // Special Registration for Gaze
245+ if ( inputSource . SourceId == InputSystem . GazeProvider . GazeInputSource . SourceId )
246+ {
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 ) ;
255+ }
256+ }
257+ }
234258 }
235259
236260 private void Update ( )
You can’t perform that action at this time.
0 commit comments