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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
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.