Search Issue Tracker

Fixed in 2017.1.0f3

Votes

1

Found in

5.6.0f3

Issue ID

897959

Regression

Yes

UI Dropdown list does not render if the Canvas is disabled and enabled again

uGUI

-

To reproduce:

1. In a new project, create Canvas
2. Press Play
3. Disable Canvas
4. Enable Canvas
5. Create Dropdown
6. Click on Dropdown list in Game view

Expected: Dropdown list renders properly no matter what you do with the Canvas at runtime
Actual: Dropdown list does not render properly when you disable and enable Canvas

Reproduced in 5.6.0f1, 5.6.0f2, 5.6.0f3, 2017.1.0a6
Did not reproduce in 5.5.2p4
Regression introduced in 5.6.0f1

Comments (10)

  1. IckyToo

    Feb 01, 2022 06:13

    This issue has NOT been fixed. It is present in 2020.3.21f1 LTS - workaround for me was a compilation of the below - add a canvas to the template of the dropdown, and also add a canvas group to the template. Alter the canvas group alpha to 0. and then it behaves appropriately on activation.

  2. AkioWFI

    Aug 03, 2020 14:27

    I found this bug on 2019.4.6 (LTS) too

  3. senkage

    Oct 23, 2018 15:27

    I solved this issue by adding a Canvas component to the "Template" object and uncheck "Override Sorting", so that the dynamically generated "Dropdown List" will appear on the correct sorting layer.

  4. WILEz1975

    Oct 09, 2018 15:21

    The problem is at line 301of Dropdown script.

    SOLUTION:
    Add a CanvasGroup to your Template GameObject and disable it.

  5. WILEz1975

    Oct 09, 2018 14:34

    2018 2.2f1there is still.
    A canvas group is created (I imagine for the transition fade) and the alpha stays at 0.

  6. zorkwarrior

    Feb 05, 2018 15:16

    I have 2017.3.0f3 and I have this (or very nearly this) issue. But I also have a workaround. Bear with me:

    a) I don't use gameobject enable/disable for my canvas - I use a canvasGroup and alter Alpha/Interactable/Blocks Raycasts. Don't remember why, probably cause the other is buggy.

    b) I have the following sorting layers: Default / BG / Dialog

    c) I have a background UI canvas that is set on the BG sorting layer, then a dialog panel with options toggles on/off above this in the dialog sorting layer. The dropDown is on the dialog panel. When I open my dialog panel and use the dropDown, it does not show the options, though I see the DropDownList's outline in the Scene view.

    d) The problem seems to be that the DropDown List is instantiated on the default sorting layer. After it is selected it is destroyed and clicking it again re-instantiates it on the default layer (which is behind both my dialog and BG layers). Hence not visible.

    e) I fixed this by simply re-arranging my sorting layers so that the default is the top, ie: BG/Dialog/Default

  7. corymalcolmtaylor

    Dec 08, 2017 09:42

    I am using 2017.1.1f1 and it is still there.

  8. Sonicboomcolt

    Jun 24, 2017 17:20

    I'm using 2017.1 and it still there. :\

  9. inancatil

    Apr 25, 2017 17:26

    i have 5.6.0f3 and it is happening..

  10. jedadams

    Apr 18, 2017 15:46

    it's back again in 5.6 .

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.