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
Comments (1)
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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/