Search Unity

Can't Rearrange Sorting Layers

Discussion in 'Editor & General Support' started by Microraptor13, May 29, 2019.

  1. Microraptor13

    Microraptor13

    Joined:
    May 29, 2019
    Posts:
    1
    In the Tags and Layers menu I tried making a new Sorting Layer called background and moving it behind the Default Layer, but I can't rearrange the layers. I tried clicking and dragging the two bars on the left side and nothing happened. I also tried making another layer to move, restarting Unity, and restarting my computer. None of these did anything to allow me to arrange the layers. Am I doing something wrong or is this a bug?
     
  2. shreyanshanchlia

    shreyanshanchlia

    Joined:
    Jun 7, 2018
    Posts:
    21
    You can only sort in the sorting layers column.
    Just click and hold while moving the sorting layer to the required position.
     
  3. Rubentronics

    Rubentronics

    Joined:
    Apr 29, 2017
    Posts:
    1
    Hi Microraptor,
    I´m having exactly the same problem, did you figure out how to solve it?
     
  4. fabiomcxavier

    fabiomcxavier

    Joined:
    Jun 2, 2019
    Posts:
    1
    Also having the issue where i cant seem to be able to move a sorting layer.

    Tried locking and unlocking it and in neither mode it moved.

    Not sure if it's relevant but i'm using the 2019.3.0a2 linux editor version (downloaded through hub)

    Error that is reported in the console:
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditorInternal.ReorderableList.DoDraggingAndSelection (UnityEngine.Rect listRect) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:708)
    UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect) (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:595)
    UnityEditorInternal.ReorderableList.DoLayoutList () (at /home/builduser/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:396)
    UnityEditor.TagManagerInspector.OnInspectorGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/Inspector/TagManagerInspector.cs:326)
    UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at /home/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:479)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Jun 3, 2019
  5. Gramms66

    Gramms66

    Joined:
    Aug 15, 2017
    Posts:
    31
    I have the same problem.
     
  6. PseudoSystem

    PseudoSystem

    Joined:
    May 13, 2019
    Posts:
    1
    Using version 2019.3.0a2 on Win10, and having the same issue.

    Console Error:
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditorInternal.ReorderableList.DoDraggingAndSelection (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:708)
    UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:595)
    UnityEditorInternal.ReorderableList.DoLayoutList () (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:396)
    UnityEditor.TagManagerInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/TagManagerInspector.cs:326)
    UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:479)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  7. Deleted User

    Deleted User

    Guest

    Also having the same issue.

    Version 2019.2.0b2 Personal
    OS: Windows 10

    Console Error:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditorInternal.ReorderableList.DoDraggingAndSelection (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:708)
    3. UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:595)
    4. UnityEditorInternal.ReorderableList.DoLayoutList () (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:396)
    5. UnityEditor.TagManagerInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/TagManagerInspector.cs:326)
    6. UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:479)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
  8. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    151
    Also having this issue.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditorInternal.ReorderableList.DoDraggingAndSelection (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:709)
    3. UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:595)
    4. UnityEditorInternal.ReorderableList.DoLayoutList () (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:396)
    5. UnityEditor.Graphs.LayerControllerView.OnGUI (UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/LayerControllerView.cs:580)
    6. UnityEditor.Graphs.AnimatorControllerTool.OnGUIEditor (UnityEngine.Rect editorRect) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1350)
    7. UnityEditor.Graphs.AnimatorControllerTool.<SetupGUI>m__B () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1620)
    8. UnityEditor.Graphs.AnimatorControllerTool.ScopedOnGUI (System.Action onGUIHandler) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1421)
    9. UnityEditor.Graphs.AnimatorControllerTool.<SetupGUI>m__1 () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1620)
    10. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298)
    11. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483)
    12. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466)
    13. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447)
    14. UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
    15. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
    16. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
    17. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:190)
    18. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
    19. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
    20. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    Also, Unity doesn't open my project through Unity Hub when launched as Administrator. 0__o
     
    Last edited: Aug 2, 2019
  9. oiez

    oiez

    Joined:
    Feb 19, 2017
    Posts:
    1
    I had this same issue with NullReferenceException errors when trying to rearrange sorting layers. Uninstalling and updating to 2019.3.0a11 fixed it for me.