Search Issue Tracker
Fixed in 2020.1.X
Fixed in 2019.3.X
Votes
2
Found in
2019.3.0a2
2019.3.0b1
2020.1.0a1
Issue ID
1180719
Regression
No
[SerializeReference] Assets lose its Data when a Class name is changed
To reproduce:
1. Download attached "SerializeReference.zip" project and open in Unity
2. Select "New Some Thing" gameObject in the Project window
3. Click from the main menu BugReport > Populate Selected Some Thing
4. While "New Some Thing" gameObject is selected in Inspector expand "Element 0" and notice it has a "Left" and "Right" item
5. Open Scripts/SomeThing.cs script
6. Rename the class "RootNode" to "RootNodeNewName" and save it
7. Switch back to Unity Editor
Expected results: Renaming class names should not cause Fata loss
Actual results: Observe that the Data is gone. "Element 0" no longer shows a "Left" and "Right" item and Console outputs Error:
"Unknown managed type referenced: [Assembly-CSharp] .RootNode"
Notes:
- This issue appears on both Windows and macOS
- Could not check on Unity 2019.3.0a1 because the project becomes corrupted
- Customer copied the example snippet for the new [SerializeReference] feature from https://forum.unity.com/threads/serializereference-attribute.678868/#post-4543723
- Another Forum link: https://forum.unity.com/threads/serializereference-data-loss-when-class-name-is-changed.736874/#post-4915595
Reproduced on Unity 2019.3.0a2, 2019.3.0b3 and 2020.1.0a1
Comments (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
- [Mobile] Player Crash on scripting_invoke_profiler_begin when the built Player Scene has an empty UIDocument and is built on IL2CPP
- Unnecessary Warnings are logged when running Player with -batchmode -nographics
- [Android] [iOS] Application silently crashes when creating and setting up Textures2D in large amounts
- Some VFX Window Panels close on entering Play mode
- VFX Graph using Redo action for Move and Connect node results in an unknown input value
jynerso
Nov 27, 2019 19:33
fixed in 2020 only? what about 2019.3