Search Issue Tracker
Fixed in 2022.1.X
Votes
5
Found in
2018.4
2019.4.5f1
2020.2
Issue ID
1271887
Regression
No
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
Notes:
- 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
-
Davidjsap
Aug 21, 2023 23:32
Has there been any movement on this? My canvas prefabs are constantly getting messed up with no rhyme or reason, untouched by me (the only user), yet the scene constantly has root order updates to the prefab when it shouldn't
-
Racot_A
Jul 30, 2023 16:03
Unity 2023.1.6f1 has the Same issue
-
johanneskosanetzky
Mar 23, 2022 10:44
According to unity employee bugfix backport to 2020.3 was requested.
https://forum.unity.com/threads/unity-accelerator-upload-caching-issues.1252581/
-
marchall_box
Jun 20, 2021 11:06
I am getting this too. It's making the conflict possibility super high
-
Kleptine
Nov 10, 2020 00:34
Can confirm, and it happens in scenes as well. Super annoying for conflicts!
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
- Any small change in UI Builder Inspector refreshes Editor Inspector
- Inaccurate Box Collider boundaries on a rotated child Cube when the parent GameObject Scale is non-uniform
- [Android] "SHADOWS_SCREEN" set as shader Keyword when no "_ShadowMapTexture" is bound leads to freeze on a build on some Mali GPU devices
- The global scene list is overridden in a project built with command line when the Override Global Scene List setting is disabled in the build profile
- Global Scenes are not included in the Build when building multiple Build Profiles at the same time
Resolution Note (fix version 2022.1):
Fixed in: 2022.1.0a15
m_RootOrder is no longer used to determine the sibling order of non-root objects