Search Issue Tracker
By Design
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
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
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