Search Issue Tracker

Fixed in 2021.1.X

Fixed in 2019.4.X, 2020.2.X

Votes

72

Found in

2019.3.0a1

2019.3.0b5

2020.1.0a1

Issue ID

1189089

Regression

Yes

Parent and child nested Scriptable Object Assets switch places when parent Scriptable Object Asset is renamed

Asset - Database

-

How to reproduce:
1. Download and open the attached project "1189089.zip"
2. Create a parent Scriptable Object Asset (Right-click -> Create -> MyObjects -> ParentObject)
3. Add a child Scriptable Object Asset (MyMenu -> AddChildObject)
4. Rename the NewParentObject Asset

Expected result: NewParentObject Asset is renamed
Actual result: NewParentObject Asset switches places with the NewChildObject Asset and the NewChildObject Asset is renamed

Reproducible with: 2019.3.0a1, 2019.3.0b6, 2020.1.0a8
Not reproducible with: 2017.4.32f1, 2018.4.11f1, 2019.2.8f1

  1. Resolution Note (fix version 2021.1):

    Requires a system rewrite of how we handle main object name. This is considered a feature. Once it is complete, most bugs in regards to asset names should be fixed. This issue is tracked internally.

Comments (15)

  1. Peter77

    Nov 20, 2020 14:15

  2. Bubsavvy

    Oct 29, 2020 02:49

    This absolutely needs to happen before version 2021... Its a problem in 2020.1.11f1... Come one man backport this... We want a good tool and we want it now :C. So frustrating.

  3. Tkrain42

    Oct 09, 2020 00:44

    Still happening in 2020.1.3, very annoying.

  4. at_

    Aug 19, 2020 10:59

    This is a major breaking issue that should definitely not be treated as mere technical debt or pushed down the roadmap by Unity.

    Regardless, I figured out a workaround for my usecase: Set your subasset hideFlags to HideFlags.HideInHierarchy and renaming the main asset will work just fine without messing up the hierarchy.

    Of course, the downside is that you won't be able to see the subassets in your project hierarchy, so if that's a necessity you're SOL.

  5. Zeejfps

    Jul 12, 2020 20:35

    Here is a workaround for this issue if anyone is interested:
    https://youtu.be/26Czu393xbQ

    Basically the issue is caused when the main asset's name is different from the file name.

  6. pep_dj

    Jun 10, 2020 09:12

    This issue still exists in 2019.4.0f1

    As ZEEJFPS noted, one workaround is ensure that alphabetic order of the parent < alphabetic order of the children

  7. Lukas-Wendt

    May 25, 2020 10:29

    Something interesting to note - the file id of the main asset is always (as far as I have seen) 11400000. In the meta file there is a field called mainObjectFileID - which is always 0. Setting this to 11400000 after the swap has occurred reverts the issue. It is really interesting that the main object is easily identifiable in the asset file but still gets lost.

  8. ayellowpaper

    May 18, 2020 10:49

    "This is considered a feature". Yeah that's definitely not a bug from a users perspective. Just as you would expect renaming a file works.

  9. leonidvoitkogismart

    Apr 08, 2020 13:48

    you can just reset name override from code

  10. Ran-Crump

    Apr 06, 2020 16:46

    Sounds like a great idea Evgeny

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.