Search Issue Tracker

Fixed in 2022.1.X



Found in




Issue ID




m_RootOrder values change (or new ones appear) in the prefab when EditorUtility.SetDirty() is called on the prefab

Scene Management


How to reproduce:
1. Open user's attached project "" (when testing with 2018.4, open the attached "" 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

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

Comments (5)

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

  2. IAndrewNovak

    Jul 30, 2023 16:03

    Unity 2023.1.6f1 has the Same issue

  3. johanneskosanetzky

    Mar 23, 2022 10:44

    According to unity employee bugfix backport to 2020.3 was requested.

  4. marchall_box

    Jun 20, 2021 11:06

    I am getting this too. It's making the conflict possibility super high

  5. Kleptine

    Nov 10, 2020 00:34

    Can confirm, and it happens in scenes as well. Super annoying for conflicts!

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.