Search Issue Tracker

Fixed in 2022.2.X

Votes

9

Found in

2018.4

2019.4

2020.3

2020.3.2f1

2021.1

2021.2

Issue ID

1331988

Regression

No

Nested Canvases with Override Sorting enabled will not sort correctly until closing and reopening the project

uGUI

-

How to reproduce:
1. Create a new Unity project
2. Add a Canvas to the Scene
3. Create a child Inherit Canvas with Override Sorting enabled
4. Create a child Image and add a Canvas component with Override Sorting to it
5. Set the Image color to red
5. Create another child Image and add a Canvas component with Override Sorting to it
6. Set the Sorting Order to 1
7. Enter Play Mode

Expected result: You see a White Image
Actual result: You see a red Image

Reproducible with: 2018.4.34f1, 2019.4.25f1, 2020.3.6f1, 2021.1.5f1, 2021.2.0a15

Workaround: Update the red Image Override Sorting via code

Notes:
1. This only reproduces the first time this setup is created. If you close and reopen the project the Images render correctly
2. If you disable and enable the parent Canvas or change the sort order in Playmode the issue is fixed

  1. Resolution Note (fix version 2022.2):

    Fixed in: 2022.2.0a1

Comments (2)

  1. joelgb2194

    Jan 27, 2023 23:42

    I am also experiencing this issue in 2021.3.16f1. Are you guys going to fix this in 2021 LTS version? Kind of important and don't really want to go to 2022 just for this.

    The workarounds aren't really possible for me as the only thing I could think of that fixes it temporarily is changing sorting order after first frame, but the UI flashes all messed up for a frame and it is very jarring...

  2. zeffyros451

    Jan 11, 2023 15:22

    it also present in 2021.3.16f1 but reopening project doesn't help

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.