this has not happened before (that i’ve noticed)… but right now when i build my project (with or without RUN) it is changing the order of some of the elements in the hierarchy! … this seems like it must be a bug…
UPDATE: if i just close my project and re-open it… the same elements change order in the hierarchy… oddly… most don’t… and the same elements change and to the same wrong order every time i close/open or build…
UPDATE: the work around was i had to remove every item that got its order scrambled and then place them back in… then it keeps them in the order i placed them in…
it seems like the project somehow got it in its ‘mind’ that those items were to be in the scrambled positions… and it would not permanently save new positions… and returned them to scrambled positions when re-loading project or building…
That does sound like a bug, report it and then post the case number here in line with :
And I am sure you will get support relatively quickly
cool… i will… another thing that is happening is that if i create a UI element… then create a prefab for it… then use the prefab to create another one… then destroy the prefab… then save and re-open prject… it tells me the prefab i missing… but it shouldn’t need a prefab to exist!
I’m having the same issue: order in hierarchy is changed automatically… I tried updating to 2018.3.2f1 with no luck, it’s not fixed!
Any news about this issue? Did you report the bug?
I finally managed to solve it. I opened the scene with a text editor, and I noticed that the affected elements where prefab instances having target: {fileID: 0} with duplicated properties. So I removed all the entries with target: {fileID: 0} and then I opened the scene in Unity, and Unity was not re-ordering elements by itself anymore.
It’s ok if the prefab is missing, the object will not have any issues. The reason it tells you the prefab doesn’t exist is so you know this object can no longer be updated automatically by updating a prefab. If you’d like this warning to go away, select the GameObject in the scene, then click the “GameObject” dropdown at the top of Unity and select “Break Prefab Instance” about halfway down.
EDIT: Actually… come to think of it, the GameObject will have issues if you save it to the scene while the prefab exists and one of these happen:
- You remove the prefab while the scene is not open
- You remove the prefab while the scene is open and don’t save the scene
This is because the scene does not save the GameObject values for prefabs… it saves a reference to the prefab. If the prefab doesn’t exist anymore at scene-load time, Unity has no idea what was attached to that GameObject.
To prevent this issue, do what I said above to “Break Prefab Instance” before you save the object to the scene.