Unable to reorder game objects in prefab

I think this is happening for recent 2020.2a16.

When you drag the game objects inside prefab editing, you are not able to move them around to reorder them anymore.

I am pretty sure it worked at a15 … or at a13?

I am not going to send another bug report as this is simply too easy to reproduce.

1 Like

I’m having the same issue (Windows 7, 2020.2.0a16).

Yeah, This has to be a bug! Serious one at that!

1 Like

We’ll have a look. For future references, please consider submitting reports before posting on the forum. That will ensure that the issue does get looked into. The forum is not set up for bug reporting.

It has been reproduced and is with the devs: Unity Issue Tracker - Can't reorder prefab child GameObjects in Prefab Mode (link will start working in an hour or so)

1 Like

Thanks for taking a look. I did consider submitting a bug report, but I have been doing so often these days and I didnt want to submit yet another same project all over again and again. I guess I felt a bit too tired of it… sop…

1 Like

If you don’t want to submit bug reports, you should probably not be using an alpha version of the editor.

Don’t get me wrong, I do submit bug reports, but I have already done with my current project multiple times already and felt a bit tired of sending exact same project all over again. It’s not like it takes 1 mins to do it… and since the issue was very easy to reproduce I thought I skip this one.

If you already submitted the project in a previous report, it is enough to reference the ticket number of the report where it was attached to. No need to upload the same project multiple times.

Is this bug fixed in 2020.2 a17 released today?

No

The fix should be part of a18.

3 Likes

Same issue here wtih a16 on 2 windows machine.
It doesn’t make sense to release a version where you cannot order the prefab structure.
What’s so annoying is “it’s ok guy let skip it on 17 and keep that on 18”.

No idea how you guess people working with a16/17 if they cannot edit their prefab.
Who manage this? skip it!

Yeah, this is pretty urgent bug, I am hoping a18 comes out pretty quickly. Quicker than usual!

Here’s a quick/minimal workaround for use in a pinch:

6083271--660249--temp_reorder_workaround.jpg

#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(Transform))]
public class TempReorderWorkaround : Editor
{
  public override void OnInspectorGUI()
  {
    base.OnInspectorGUI();
    if (target == null) return;
    Transform t = (Transform)target;
    if (t.parent == null) return;
    Transform p = t.parent;
    if (p.childCount == 1) return;
    GUILayout.Space(5);
    GUILayout.BeginHorizontal();
    if (GUILayout.Button("Move Up")) { t.SetSiblingIndex(Mathf.Max(t.GetSiblingIndex() - 1, 0)); EditorUtility.SetDirty(p); }
    if (GUILayout.Button("Move Down")) { t.SetSiblingIndex(Mathf.Min(t.GetSiblingIndex() + 1, p.childCount + 1)); EditorUtility.SetDirty(p); }
    if (GUILayout.Button("First")) { t.SetAsFirstSibling(); EditorUtility.SetDirty(p); }
    if (GUILayout.Button("Last")) { t.SetAsLastSibling(); EditorUtility.SetDirty(p); }
    EditorGUILayout.EndHorizontal();
  }
}
#endif

Edit: Added EditorUtility.SetDirty calls - I tried using Undo.RecordObject but it wasn’t getting flagged for saving… this is working though.

1 Like

Haha… such a hackish but cleaver work around! So sad that we have to resolve to this… but thanks!

2 Likes

The same thing works for RectTransform, just give it a different class name and change line 5 to [CustomEditor(typeof(RectTransform))]

a18 working a charm!
Prefab fixed :slight_smile:

1 Like

a18 released ?

Let me check!!!

1 Like