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
- Search icon visual quality drops after Unity Theme change on non-primary monitor
- [macOS] Localization files are not created in the Xcode project
- Entity ID for Tile objects is serialized twice which throws an error when using Debug Inspector
- Shader Graph information icon appears below the Property Type Node
- Adding a new Multiplayer Player Tag in the Project Settings window creates a new section in the Project Settings window instead of a popup which is inconsistent with the Editor’s Tags workflow
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.