Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
0
Found in
2020.3.38f1
2021.3.8f1
2022.1.4f1
2022.2.0b5
2023.1.0a6
Issue ID
UUM-13561
Regression
No
Prefab does not save the Input Action Reference when the button is used to assign a value
Reproduction steps:
- Open the attached project (“PrefabBug.zip“)
- Select Assets/TestPrefab
- Open “Testprefab”
- In the Inspector press the button “Assing Input Action Reference“
- Save and close “Testprefab”
- Select Assets/TestPrefab
- Observe the field called “Input Action Reference”
Expected results: “Input Action Reference” field contains a value
Actual results: Value is not saved
Reproducible with: 2020.3.38f1, 2021.3.8f1, 2022.1.4f1, 2022.2.0b5, 2023.1.0a6
Reproduced on: Windows 11
Comments (1)
-
k0rveen
Jan 27, 2026 13:46
What?
InputActionReference - is ScriptableObject and in summary:
/// The difference to a plain reference directly to an <see cref="InputAction"/> object is that an InputActionReference can be serialized without causing the referenced <see cref="InputAction"/> to be serialized as well. The reference will remain intact even if the action or the map that contains the action is renamed.
/// References can be set up graphically in the editor by dropping individual actions from the project browser onto a reference field.
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
- Redoing creation of Sub Scenes and Cube GameObjects in Hierarchy throws “Assertion failed on expression: 'targetScene != nullptr’” error in Console window
- Selecting “New Sub Scene” after assigning “New Scene” in Sub Scene Script Component throws “Destroying GameObjects immediately is not permitted” in the Console window
- Shader Graph "Zoom Step Size" can be set to 0 even though the zoom still works
- Enabling/Disabling the Deprecated Nodes doesn't apply to the opened Shader Graph unless any Variable is added to the Blackboard
- Group Selection title text size is smaller in renaming than the actual font size
Resolution Note:
This is not a bug, but a limitation in the Prefab system.
InputActionReference.Create creates a ScriptableObject in memory and SOs are categorized as Assets even when they only exists in memory, which is the case here.
The Prefab system does not support saving objects categorized as Assets to a prefab and a Prefab asset can't reference an object that only exists in memory, so the reference is removed from the final Prefab when it is saved.
A work around is to make the ScriptableObject an asset after it has been instantiated, but before saving the prefab. Simple use https://docs.unity3d.com/ScriptReference/AssetDatabase.CreateAsset.html after calling InputActionReference.Create
Resolution Note (2023.1.X):
This is not a bug, but a limitation in the Prefab system.
InputActionReference.Create creates a ScriptableObject in memory and SOs are categorized as Assets even when they only exists in memory, which is the case here.
The Prefab system does not support saving objects categorized as Assets to a prefab and a Prefab asset can't reference an object that only exists in memory, so the reference is removed from the final Prefab when it is saved.
A work around is to make the ScriptableObject an asset after it has been instantiated, but before saving the prefab. Simple use https://docs.unity3d.com/ScriptReference/AssetDatabase.CreateAsset.html after calling InputActionReference.Create