File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Packages/com.unity.inputsystem/InputSystem/Plugins/HID Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,14 @@ public HIDPageUsage(HID.GenericDesktop usage)
8484 /// <see cref="HID.GenericDesktop.MultiAxisController"/>, <see cref="HID.GenericDesktop.TabletPCControls"/>,
8585 /// and <see cref="HID.GenericDesktop.AssistiveControl"/>.
8686 /// </remarks>
87- public static ReadOnlyArray < HIDPageUsage > supportedHIDUsages { get ; set ; }
87+
88+ public static HIDPageUsage [ ] s_SupportedHIDUsages ;
89+
90+ public static ReadOnlyArray < HIDPageUsage > supportedHIDUsages
91+ {
92+ get => s_SupportedHIDUsages ;
93+ set => s_SupportedHIDUsages = value . ToArray ( ) ;
94+ }
8895
8996 /// <summary>
9097 /// Add support for generic HIDs to InputSystem.
@@ -96,12 +103,12 @@ public HIDPageUsage(HID.GenericDesktop usage)
96103#endif
97104 static void Initialize ( )
98105 {
99- supportedHIDUsages = new ReadOnlyArray < HIDPageUsage > ( new [ ]
106+ s_SupportedHIDUsages = new [ ]
100107 {
101108 new HIDPageUsage ( HID . GenericDesktop . Joystick ) ,
102109 new HIDPageUsage ( HID . GenericDesktop . Gamepad ) ,
103110 new HIDPageUsage ( HID . GenericDesktop . MultiAxisController ) ,
104- } ) ;
111+ } ;
105112
106113 InputSystem . RegisterLayout < HID > ( ) ;
107114 InputSystem . onFindLayoutForDevice += HID . OnFindLayoutForDevice ;
You can’t perform that action at this time.
0 commit comments