File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Assets/MRTK/SDK/Editor/Inspectors/UX/Interactable Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -556,12 +556,26 @@ public static bool TryGetInputActions(out string[] descriptionsArray)
556
556
return false ;
557
557
}
558
558
559
- MixedRealityInputAction [ ] actions = CoreServices . InputSystem . InputSystemProfile . InputActionsProfile . InputActions ;
559
+ MixedRealityInputSystemProfile inputSystemProfile = CoreServices . InputSystem ? . InputSystemProfile ;
560
560
561
- descriptionsArray = new string [ actions . Length ] ;
562
- for ( int i = 0 ; i < actions . Length ; i ++ )
561
+ if ( inputSystemProfile != null && inputSystemProfile . SpeechCommandsProfile != null )
563
562
{
564
- descriptionsArray [ i ] = actions [ i ] . Description ;
563
+ MixedRealityInputAction [ ] actions = inputSystemProfile . InputActionsProfile . InputActions ;
564
+
565
+ descriptionsArray = new string [ actions . Length ] ;
566
+ for ( int i = 0 ; i < actions . Length ; i ++ )
567
+ {
568
+ descriptionsArray [ i ] = actions [ i ] . Description ;
569
+ }
570
+ }
571
+ else
572
+ {
573
+ descriptionsArray = null ;
574
+ }
575
+
576
+ if ( descriptionsArray == null || descriptionsArray . Length < 1 )
577
+ {
578
+ return false ;
565
579
}
566
580
567
581
return true ;
You can’t perform that action at this time.
0 commit comments