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

Scene Management

-

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

  1. Response avatar

    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 (2)

  1. Aad636913d713205c201d2ae82fa7321?d=mm

    marchall_box

    Jun 20, 2021 11:06

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

  2. E1d861ff15540a3ac132f917bf78e860?d=mm

    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.