Hello all,
I’ve been doing some research on this but to no avail so far, so before I go through the bug posting process (which will require a lot of effort on my side to repro in another project). I wanted to check out if anyone else is having issues when unpacking prefabs, and then packing them back to the original?
When packing an instance of a prefab back to its original on the Projects folder, several objects go missing from it (they are simply deleted from the instance AND from the prefab), so the only way to get them back is by pulling a back up. Luckily I work with git so that’s not an issue for me, but people working on standalone projects might lose data like that with no chance of getting it back.
I get the following errors when doing so:
Assertion failed on expression: 'm_UsedFileIDs.count(fileID) == 0'
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
CheckConsistency: Transform child has another parent
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Failed to load component (RectTransform)! Removing it!
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
It is not allowed to set DontSaveEditor or DontSaveInBuild on a Transform component, unless it has already been set on the GameObject.
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Transform component could not be found on game object. Adding one!
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Prefab has multiple Transform components! Removing them automatically would not be safe.
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
The issue started happening after a while using a particular prefab (which is a quite complex UI panel system), just by unpacking and packing it back the top 2 errors are thrown.
I was able to repro the issue by exporting and importing in a new project on 2018.3.10f, but due to the complexity of the required dependencies, preparing a proper bug report build would take hours, just wanting to avoid that for now.
The only workaround for this issue is to actually make a new prefab from the instance, doing that solves the packing issue from then on. But it’s not really a solution because the references for the prefab will have to be manually repaired.