Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.1.0-preview.3
Issue ID
1306769
Regression
No
[InputSystem] Could not assign InputActionReference value programmatically
How to reproduce:
1. Open the attached project "1306769.zip"
2. Load the "ButtonRemapScreen" scene
3. In the Menu bar click on 'Test' > 'Add Action' and 'Link Action' items
4. In the Hierarchy view select 'ButtonRemapScreen' > "Test button" item
5. Observe the "Test Action (Script)" component in the Inspector window
6. Observe the Console window
Expected result: Test Action component's Action Reference field has an InputActionReference value. In the Console window message "[ActionReference != null] after saving: True" appears
Actual result: Test Action component's Action Reference field doesn't have an assigned InputActionReference value. In the Console window message "[ActionReference != null] after saving: True" appears
Reproducible with: 1.1.0-preview.3 (2019.4.20f1, 2020.2.4f1, 2021.1.0b6, 2021.2.0a4)
Could not test with: 2018.4.31f1 (due to errors)
Notes:
- Not reproducible when assigning InputActionReference value to Action Reference field manually in the Inspector view
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
- Prefab override popup is cropped/positioned incorrectly when more than one display is used and a higher display Scale is set
- Opening a dropdown on a small screen results in its instant closing when mouse cursor is pressed where the dropdown is going to be opened
- Only "ArgumentNullException: Value cannot be null" is displayed instead of all the actual errors when opening a project with numerous compilation errors
- MultiColumnListView and MultiColumnTreeView do not change selection on first input when focus is set by code
- SerializedProperty.DataEquals is returning false when SerializedProperty.EqualContents return true
Resolution Note:
InputActionReferences are ScriptableObjects. If they are created as temporaries, they cannot be referenced from persistent data.
InputActionReference.Create() is convenient but also very much hides the transient nature of the objects it creates. Thus, the problem is not obvious.
We hope to improve on this in a future version of the input system.