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
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
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.