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
- "Process VFXCamera Command" column is displayed in the "Render Graph Viewer" when there are no VFX in the Scene
- [Performance] Vulkan performing much worse than OpenGLES due to excessive buffer copies on Quest 2/3
- An error 'AssertionException: Assertion failure. Value was False' is displayed in the Console when maximizing or unmaximizing the UI Builder
- Asset Database warning is being logged continuously when creating a script in an embedded package
- Build process only shows Initializing when building for Android
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.