Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.2.X
Parent and child nested Scriptable Object Assets switch places when parent Scriptable Object Asset is renamed
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
Nov 20, 2020 14:15
Related forum thread:
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.
Oct 09, 2020 00:44
Still happening in 2020.1.3, very annoying.
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.
Jul 12, 2020 20:35
Here is a workaround for this issue if anyone is interested:
Basically the issue is caused when the main asset's name is different from the file name.
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
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.
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.
Apr 08, 2020 13:48
you can just reset name override from code
Apr 06, 2020 16:46
Sounds like a great idea Evgeny
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- URP Sample Buffer Image Tile is moved when the Offset Value is changed
- Static constructor in a struct returns false when running tests with IL2CPP
- Console throws warnings and a MissingReferenceException error for XR packages when doing a clean project import
- [Linux][IL2CPP] Dedicated server crashes when calling Socket.Send
- [2D URP] Documentation link on 3D Renderer Data doesn't work
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.