Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.1.2f1
Issue ID
1347670
Regression
No
[XR] InputFeatureUsage doesn't show up in the Inspector
Repro steps:
1. Open QA attached project 'repro_1347670'
2. Open "SampleScene' and select 'GameObject' in the Hierarchy
Expected: In the Inspector under the 'Test' component InputFeatureUsage shows up as a field under 'Controller'
Actual: InputFeatureUsage doesn't show up in the Inspector
Reproducible with: 2019.4.28f1, 2020.3.13f1, 2021.1.14f1, 2021.2.0b4, 2022.1.0a1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Linux] Cannot reorder GameObjects in the Hierarchy when the AI Assistant package is installed
- [iOS] Text Input field stops receiving changes when the "Cancel" button is used on the soft keyboard
- [WebGPU] URP RenderGraph RenderPass doesn't clear textures
- Query Builder items display raw code style names instead of human readable labels in search field
- “+” button does nothing and has no functionality when clicked in Human Template "Bone Template" list
Resolution Note (2022.1.X):
InputFeatureUsage<T> is a generic type, which means it is not serialized. See Serialization rules in https://docs.unity3d.com/Manual/script-Serialization.html
It is recommended that the Input System package along with Input Actions are used instead of using the features API to determine whether a specific button is pressed on a controller. The bindings for the Input Action can be configured and changed to different buttons within the Inspector window or when editing an Input Action Asset that contains the action.
If the Input System is not used, your script can be changed to serialize a string value instead. Then in a method, construct an instance of the InputFeatureUsage<bool> struct using the serialized name of the usage.
There are no plans to add support for a friendlier GUI for serializing an InputFeatureUsage<T> in a script since we encourage our users to use the Input System for reading input values.