File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
MixedRealityToolkit.Providers/WindowsMixedReality/Shared/Extensions
MixedRealityToolkit/Inspectors/Profiles Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 33
44#if ( UNITY_WSA && DOTNETWINRT_PRESENT ) || WINDOWS_UWP
55using Microsoft . MixedReality . Toolkit . Utilities ;
6+ #if WINDOWS_UWP
67using Windows . UI . Input . Spatial ;
8+ #elif DOTNETWINRT_PRESENT
9+ using Microsoft . Windows . UI . Input . Spatial ;
10+ #endif
711#endif // (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP
812
913namespace Microsoft . MixedReality . Toolkit . WindowsMixedReality
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ public class MixedRealityInputSystemProfileInspector : BaseDataProviderServiceIn
1919
2020 private static bool showDataProviders = false ;
2121 private const string ShowInputSystem_DataProviders_PreferenceKey = "ShowInputSystem_DataProviders_PreferenceKey" ;
22- private SerializedProperty dataProviderConfigurations ;
2322
2423 private SerializedProperty focusProviderType ;
2524 private SerializedProperty focusQueryBufferSize ;
@@ -212,10 +211,14 @@ protected override ServiceConfigurationProperties GetDataProviderConfigurationPr
212211 /// <inheritdoc/>
213212 protected override IMixedRealityServiceConfiguration GetDataProviderConfiguration ( int index )
214213 {
215- var configurations = ( target as MixedRealityInputSystemProfile ) ? . DataProviderConfigurations ;
216- if ( configurations != null && index >= 0 && index < configurations . Length )
214+ MixedRealityInputSystemProfile targetProfile = target as MixedRealityInputSystemProfile ;
215+ if ( targetProfile != null )
217216 {
218- return configurations [ index ] ;
217+ var configurations = targetProfile . DataProviderConfigurations ;
218+ if ( configurations != null && index >= 0 && index < configurations . Length )
219+ {
220+ return configurations [ index ] ;
221+ }
219222 }
220223
221224 return null ;
You can’t perform that action at this time.
0 commit comments