Search Issue Tracker
By Design
Votes
1
Found in
5.5.0b1
Issue ID
842419
Regression
No
Unable to serialize some of Unity's formats to Json with EditorJsonUtility.FromJsonOverwrite
Steps to reproduce:
1. Download and open the attached project
2. Open Window-->Editor Tests Runner
3. Click "Run All"
Expected result: all tests run succeed
Actual result: some tests fail, indicating that Unity is unable to serialize those formats as Json
Reproduced on 5.5.0b1, 5.5.0b9, 5.6.0a1 18e0ef8e6d09
Due to updated libraries, method unavailable in 5.4 and below
Note: serializations are written in "ContentPipeline" and called in "SerializationTests"
Comments (2)
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
- NullReferenceExceptions are thrown on Editor launch when the Project window was locked in the previous project
- Render Pipeline Converter selected asset counter reports one fewer item when using manual selection
- [Android] [Adreno] [WebGL] A light cookie is not rendered with shader compile error when WebGL build is launched on a device with Adreno GPU
- Rigibody sliding over a flat surface that is made of several GameObjects detects false collisions when Collision Detection is set to "Continuous" or "Continuous Dynamic"
- UI Toolkit Label height is incorrectly calculated when using max-width with percentage value
tonycoculuzzi
Jan 08, 2017 01:55
Sorry for the double post, but below is the text from my bug report on the same issue:
UnityEngine.JsonUtility.ToJson does not properly store data for UnityEngine.Object references. When storing a reference, and adding another file of the same type to the project, the reference will be broken next time the editor is opened.
For exmaple: Store a reference to a Material. Add another Material to the project. Close and reopen the Unity project. The reference is now broken.
IMPORTANT INFORMATION:
After comparing the YAML and JSON outputs when serializing an object, the YAML output seems to store a "fileID", a "guid", and a "type" value, for a UnityEngine.Object. However, the JSON output only seems to store an "instanceID" value, which is a value that seems to be unique every time the application (or Unity) runs
tonycoculuzzi
Jan 08, 2017 01:53
Something to take into consideration: This GREATLY affects tool/asset store addon development.
Note: reproduced on 5.5.0f1