Search Issue Tracker
Fixed in 2021.2.X
Votes
26
Found in
2019.3.0a2
2020.1
2020.1.0a15
Issue ID
1204407
Regression
No
[SerializeReference] Serialized Reference Data lost when the Class name is refactored
Reproduction steps:
1. Open "1204407" project
2. In the Project window Right Click -> "Create" -> "Data"
3. In the Inspector window click "Add"
4. Open "Jump2" and "Data" scripts
5. Change "Jump1" to "Jump2" and save
6. Focus the Editor
Expected Result: Class name refactoring doesn't affect Serialized Reference Data
Actual Result: Serialized Reference Data lost when the Class name is refactored resulting in "Unknown managed type referenced: [Assembly-CSharp] Game.Actions.Jump1" error
Reproduced with: 2020.1.0a16, 2019.3.0f3, 2019.3.0a2
Did not reproduce on(Feature not yet implemented): 2019.3.0a1, 2019.2.16f1, 2018.4.14f1, 2017.4.35f1
Notes:
2019.3.0a2 - "SafeBinaryRead cannot read [SerializeReference] fields without being provided with the full list of referenced types!"
Comments (2)
-
Tortuap
Jun 06, 2025 20:13
"This will require some significant architectural changes which we are looking to address in the 2021 time frame". In 2025, this has still not being addressed.
-
OndrejP
Oct 28, 2020 20:18
I'd be okay with FormerlySerializedAs on the class itself, it would specify previous name.
This workflow is used for fields and it's something I was expecting would work on classes as well.
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note (fix version 2021.2):
This will require some significant architectural changes which we are looking to address in the 2021 time frame. Currently one way around the issue is to use UnityEngine.Scripting.APIUpdating.MovedFromAttribute to tag the class which was renamed, moved from namespace or assembly.