Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Unity UI Canvas hierarchy/drawing order broken after upgrade to Unity 2021.3

Discussion in 'UGUI & TextMesh Pro' started by solinvictus1313, Jul 14, 2022.

  1. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,212
    We're all waiting for the fix that should of been released yesterday, actually should of been released on 23rd August but they're behind on their own 2 week schedule.
     
  2. SampsaPlaysome

    SampsaPlaysome

    Joined:
    Oct 20, 2019
    Posts:
    17
    Downgraded to 2021.3.5f1 and now it seems to be in working order.

    TBH the fix should have been released 28 Jul in 2021.3.7f1 already. This feature has been broken for almost 2 months now. Totally unacceptable for LTS release.
     
  3. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,212
    Agreed!
     
  4. yuliyF

    yuliyF

    Joined:
    Nov 15, 2012
    Posts:
    179
    U2021.3.9 is out : link
    I hope, out UIs will be fixed =) .. loading 3.9
     
  5. juanfornos

    juanfornos

    Joined:
    Feb 17, 2018
    Posts:
    10
    The drawing order appears to be working as expected on 2021.3.9 but they introduced a new bug: graphics in nested canvases are still blocking interactions even when the parent canvas is disabled (this means the graphics aren't rendered but still blocking the mouse input).

    Edit: typos

    Edit 2: in my use case this means that EventSystem.RaycastAll is returning results with those graphics even when they aren't rendered. Not sure about other implications with other Unity systems. As a workaround, you can toggle the sub canvas. I already reported the bug.
     
    Last edited: Sep 26, 2022
  6. Asgarde26

    Asgarde26

    Joined:
    Jul 24, 2019
    Posts:
    3
    uncorrected bug in U2021.3.9
    UI still broken.
     
  7. ArthurAulicino

    ArthurAulicino

    Joined:
    Sep 4, 2018
    Posts:
    4
    I updated from 2021.3.5f1 to 2021.3.9f1, and now my unity editor randomly crashes.
    It might be a new bug since this didn't happen before.

    Crash 1 stack trace:
    #0 0x00000103ae9e6c in UI::Canvas::SetSortingOrder(short)
    #1 0x00000102b8ae3c in Canvas_Set_Custom_PropSortingOrder(ScriptingBackendNativeObjectPtrOpaque*, int)
    #2 0x00000369a71d7c in (wrapper managed-to-native) UnityEngine.Canvas:set_sortingOrder (UnityEngine.Canvas,int) [{0x379be6d18} + 0xcc] (0x369a71cb0 0x369a71e10) [0x146d96a80 - Unity Child Domain]


    Edit:

    This one also started happening:

    Crash 2 stack trace:
    #0 0x00000105ac564c in UI::CanvasRenderer::InitializeClass()::FunctorImpl_966kCanvasHierarchyChanged::Call(void*, int, MessageData&)
    #1 0x00000104f07474 in MessageHandler::HandleMessage(void*, unsigned int, MessageIdentifier const&, MessageData&)
    #2 0x00000104f072bc in GameObject::SendMessageAny(MessageIdentifier const&, MessageData&)
    #3 0x000001053a2524 in Transform::BroadcastMessageAny(MessageIdentifier const&, MessageData&)
    #4 0x000001053a2554 in Transform::BroadcastMessageAny(MessageIdentifier const&, MessageData&)
    #5 0x000001053a2554 in Transform::BroadcastMessageAny(MessageIdentifier const&, MessageData&)
    #6 0x00000105abe064 in UI::Canvas::WillDestroyComponent()
    #7 0x00000104f036cc in GameObject::WillDestroyGameObject()
    #8 0x00000105216efc in PreDestroyRecursive(GameObject&, unsigned long*)
    #9 0x00000105216f64 in PreDestroyRecursive(GameObject&, unsigned long*)
    #10 0x00000105216f64 in PreDestroyRecursive(GameObject&, unsigned long*)
    #11 0x00000105217a4c in DestroyObjectHighLevel_Internal(Object*, bool)
    #12 0x00000105214d74 in DestroyObjectHighLevel(Object*, bool)
    #13 0x000001052274b0 in DestroyWorldObjects(dynamic_array<int, 0ul> const&)

    They all stopped after I rolled back to unity 2021.3.5f1.

    Once more new bugs have been introduced to the latest LTS build. Unfortunately, this new version is still not usable for me.
     
    Last edited: Sep 16, 2022
  8. MidnightCoffeeInc

    MidnightCoffeeInc

    Joined:
    Feb 28, 2017
    Posts:
    426
    Anyone tested this in 2021.3.10 that can report back?
    Thanks!
     
  9. Vincent13122

    Vincent13122

    Joined:
    Oct 26, 2014
    Posts:
    155
    I'm on 2021.3.9 and have had no problems with the ui anymore personally
     
    MidnightCoffeeInc likes this.
  10. MidnightCoffeeInc

    MidnightCoffeeInc

    Joined:
    Feb 28, 2017
    Posts:
    426
    Awesome, thanks for the update. Hopefully things work fine in the latest one too!
     
    Vincent13122 likes this.
  11. ltomov

    ltomov

    Joined:
    Aug 3, 2017
    Posts:
    68
    Both 2021.3.9 and 2021.3.10 work fine in my case.
     
  12. Chunikus

    Chunikus

    Joined:
    Sep 5, 2020
    Posts:
    12
    I've had this bug in 2021.3.6f1 and it seems fine in 2021.3.10f1
     
  13. LaireonGames

    LaireonGames

    Joined:
    Nov 16, 2013
    Posts:
    673
    I lost track of how many versions of Unity I downloaded last night in the 2021.3 range and so far None of them have uGUI working 100% and each has a slightly different flavour of something going wrong.

    Its an utter joke for what is supposed to be an LTS version of the engine.

    What I am seeing is the drawing order can be fixed in some versions but in the versions that draw correctly I'm seeing issues with scrolling not working properly.

    .10 and .11 both have drawing order issues for me
     
  14. nikomikulicic

    nikomikulicic

    Joined:
    Dec 3, 2012
    Posts:
    7
    2021.3.11f1 has the issue for me
     
  15. doseon

    doseon

    Joined:
    Mar 17, 2021
    Posts:
    25
    Reoccurring in 2021.3.11f1 version.
     
  16. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    491
    Unity 20221.3.11 crashes when enabling a GO with a canvas with override sorting.... Is the problem related?
     
    ArthurAulicino likes this.
  17. downstroypvp

    downstroypvp

    Joined:
    May 30, 2016
    Posts:
    26
    I am facing the same issue as first post on 2021.3.9. UI is displayed in wrong hierarchical order. The first canvas in the hierarchy seems to be drawn last (and is above all the other). However I modify my prefab, this canvas is always drawn first.

    All my canvases are in default layer, sort order 0. I never has this happen on 2020.

    EDIT: It looks like it was because I had several root canvases. I assumed that the draw order of those would depend on their hierarchy, but it appears that no.
     
    Last edited: Nov 15, 2022
  18. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    39
    Anyone found a way around this? My UI sorting is all over the place. I have only one Canvas but elements that are higher in the hierarchy tree appear in front of elements lower in the hierarchy tree.