Search Issue Tracker
Fixed in 2022.1.X
m_RootOrder values change (or new ones appear) in the prefab when EditorUtility.SetDirty() is called on the prefab
How to reproduce:
1. Open user's attached project "PrefabsUnstableDataReport.zip" (when testing with 2018.4, open the attached "ReproFor2018.4.zip" instead)
2. Search (or manually navigate to "Assets\Art\Environment\Prefabs\Ground_Props\Independent\Nested") and select "IN_Cover_Furniture_2x1_W.prefab"
3. Use SetDirty() on the selected prefab (Flush > Selected Prefabs)
4. Compare the differences in files between "IN_Cover_Furniture_2x1_W.prefab" and "IN_Cover_Furniture_2x1_W-Original.prefab" (more info in the notes)
Expected result: "IN_Cover_Furniture_2x1_W.prefab" and "IN_Cover_Furniture_2x1_W-Original.prefab" files are identical
Actual result: m_RootOrder values of "IN_Cover_Furniture_2x1_W.prefab" are different from "IN_Cover_Furniture_2x1_W-Original.prefab", for example, "propertyPath: m_RootOrder value: 8" turns into "propertyPath: m_RootOrder value: 7" (in 2018.4.26f1 the previously existing m_RootOrder values stay indentical, while previously non-existent m_RootOrder code lines with their new values appear)
Reproducible with: 2018.4.26f1, 2019.4.9f1, 2020.1.4f1, 2020.2.0a21
- To compare the differences in files (step 4 in how to reproduce) Open Source program "WinMerge" (for Windows OS, download and run attached file "WinMerge-2.16.6-Setup.exe") can be used
- At the beginning both "IN_Cover_Furniture_2x1_W.prefab" and "IN_Cover_Furniture_2x1_W-Original.prefab" are identical
- "FlushChanges.cs" calls EditorUtility.SetDirty() on the prefab
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Standard Unity Materials and Shaders become corrupted after importing specific Asset Packages
- [Linux][OpenGL][Vulkan] Draw calls are not shown in the Event List when taking a capture of a frame with RenderDoc
- Inaccurate collision detections when Rigidbody Collision Detection is set to "Continuous" or "Continuous Dynamic"
- Crash on Object::IncrementPersistentDirtyIndex when upgrading project version
- [iOS] Multiple Xcode project instances created before opens up when performing Build and Run for iOS Platform