Search Issue Tracker
By Design
Votes
3
Found in
5.5.0f3
Issue ID
857615
Regression
Yes
EditorJsonUtility.ToJson does not serialize data of List items
Steps to reproduce:
1. Open project
2. In menu, press BugReport->PrintJson
3. Observe the information in the console
Expected: container json prints out data of the its items:
{"MonoBehaviour":{"m_Enabled":true,"m_EditorHideFlags":0,"m_Name":"","m_EditorClassIdentifier":"","items":[{{"MonoBehaviour":{"m_Enabled":true,"m_EditorHideFlags":0,"m_Name":"","m_EditorClassIdentifier":"","myString":"hello","myInt":1,"myFloat":1.2300000190734864}}}{{"MonoBehaviour":{"m_Enabled":true,"m_EditorHideFlags":0,"m_Name":"","m_EditorClassIdentifier":"","myString":"hello","myInt":1,"myFloat":1.2300000190734864}}}]}}
OR json prints out the not null instance ID's of its items, ie:
{"MonoBehaviour":{"m_Enabled":1,"m_EditorHideFlags":0,"m_Name":"","m_EditorClassIdentifier":"","items":[{"instanceID":-3522},{"instanceID":-3524}]}}
Actual: only the instanceID:0 is shown under items:
{"MonoBehaviour":{"m_Enabled":true,"m_EditorHideFlags":0,"m_Name":"","m_EditorClassIdentifier":"","items":[{"instanceID":0},{"instanceID":0}]}}
Reproduced on: 5.5.0f3, 5.6.0a6
Not reproduced on: 5.4.3p3
Regression introduced on: 5.5
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
- [VFX] Custom HLSL with 'int' parameter, without the 'in/out/inout' access modifier is not supported
- [Windows] Lens Flare doesn't work in the Lens Flare Showroom URP Sample Scene
- Crash on ujob_execute_job while using OverlapBoxCommand when collisions are more than maxHits
- The validity of the multiple handles can behave differently based on the load/release operations order, when multiple Addressables.LoadAssetAsync and Addressables.Release are used to load and release the same Addressable Asset
- Dynamic text is rendered in the background when it is inside the <font> tag
SanityIsOverrated
Dec 30, 2016 14:31
Thanks for already reporting this. Appears to be related to my issue in the forums: https://forum.unity3d.com/threads/editorjsonutility-in-unity-5-5.448634/