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

Scripting

-

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)

  1. 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/

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.