Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2021.2.X
Votes
1
Found in
2021.2
Issue ID
1383439
Regression
Yes
[SERIALISATION] Going into play mode does not deserialize the object properly
When going into play mode, a Prefab with the attached MonoBehaviour with an override on the string value for the objectValue will not deserialize the object properly.
1. Open provided project
2. Open SampleScene
3. Select TestPrefab in hierachy
4. Change string fields, Enter playmode
Expected Result: no error
Actual Result: Error printed in console: A field decorated with [SerializeReference] references an unknown managed type!
Notes: If the error does not occur, try changing the string once more and entering play mode again. Mostly required in 2022.1.
Changing the options of Domain reload and reload scene on enter Playmode does not affect the results (Preferences/Editor)
-
Catsoft-Works
Dec 20, 2021 16:35
This has only been partially fixed. Now when instantiating a prefab variant with an overriden field that is marked as [SerializeReference] will not use the overriden value, but the last selected one from a component of the same type.
This is most likely a caching issue where the last value used is used.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0b1
Resolution Note (fix version 2021.2):
Fixed inĀ 2021.2.6f1