Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Dropdown ui component bug in Unity 5.6 (not in 5.5.3 or earlier)

Discussion in 'Unity UI & TextMesh Pro' started by Mikael-H, Apr 6, 2017.

  1. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    247
    So I'm having the strangest bug occurring while using Unity 5.6 dropdowns. Before I go any further, let me just state that I have tried reproducing this in a new project but have not managed to do so. I post this here in the hopes that someone might have seen something similar and that we can maybe together come up with a repro case so we can file a proper bug report.

    Background
    In short, I have panels that contain among other things dropdown boxes. There are several layers of hierarchy and I also use both vertical layout groups and horizontal layout groups at different levels of the hierarchy, with a content size fitter at the top level. The panels are displayed in screen space but are positioned each frame to correspond to a world space position. This is to achieve a ui component that follows an object in world space but does not rescale or anything. When the user wants to edit data, the panel stops following the object and becomes draggable.

    Problem
    When the user starts editing and wants to select a different item in a dropdown box sometimes the panel containing the items is, for some reason, displayed in world space instead of screen space. This seems to depend on things like distance to the camera and orientation of camera but I can't say for sure as I can't come up with a case where it happens with 100% certainty.

    Inspection of editor view shows that the items of the dropdown are positioned correctly in relation to their parent, they are only displayed in world space (so shader issue maybe?).

    Pics or it didn't happen
    dropdown box bug.png
    Game view: In this image you can see the items of the dropdown positioned in world space.

    dropdown box bug editor view.png
    Editor view: In this image you can see that the items are located correclt in the editor view. They are then transformed somehow in the game view to appear to be in world space. Inspection of the transform also indicates that the gameobject actually is positioned correctly, just somehow displayed in the wrong position.

    For now I have downgraded to Unity 5.5.3 and that seems to work. As this seems like a fringe case I'm afraid that it will be hard for QA to pin down unless given a repro case so for the love of Odin, Thor and all that you may find holy, please if you have encountered anything similar, please sound off below! Otherwise I fear I'll be stuck in the nether with 5.5.3 for all time to come...


    EDIT:
    Using deferred shading path btw.
     
    Last edited: Apr 6, 2017
  2. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    604
    I haven't experienced your exact bug, but after upgrading a project to 5.6 my dropdowns are now blocking all input and not showing the content that should be inside while also preventing the user from selecting an option or closing the dropdown. My experience may be tied to world space rendering but it's hard to be sure without burning more time.

    If I add a new dropdown and try to rebuild it the same thing happens. At this point I believe the dropdowns are broken, I never had an issue using them in the past.

    My current plan is to revert back to 5.5 until this is fixed. What happened to the stable releases that have been a big speaking point recently, this is game/flow breaking if a user opens one of these..

    Dropdown bug.jpg
     
    Last edited: Apr 9, 2017
    akaelenka, adilnajeeb and Mikael-H like this.
  3. mpue

    mpue

    Joined:
    May 24, 2015
    Posts:
    7
    I can confirm that behaviour.

    DropDown content is now displayed inside the world space instead of screen space if the parent canvas is being disabled and reenabled again.

    dropDownBug.jpg
     
    Mikael-H likes this.
  4. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    247
    Ahhh so that's what's causing it! I'll see about filing a bug report later today! Thanks for pointing out what should have been, but wasn't, obvious :D
     
  5. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    247
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    Stephen_O and Mikael-H like this.
  7. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    247
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    Possibly. Can't say for sure until it goes into the patch but I will try to get it into that one.
     
    Mikael-H likes this.
  9. adilnajeeb

    adilnajeeb

    Joined:
    Mar 2, 2015
    Posts:
    1
    I am facing the exact same issue :/
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    Yes the drop down is either one of two bugs which are both now fixed. Should be in an upcoming patch.
     
    Stephen_O and Mikael-H like this.
  11. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    247
    Nice! Keep up the good work!
     
    karl_jones likes this.
  12. Henner

    Henner

    Joined:
    Apr 23, 2015
    Posts:
    1
    it's not fixed in the yesterday (18. April) released patch-version, isn't it?
    I'm still facing the bug ..it's really blocking the work!
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    No its not in the patch yet. Should be in the next one 5.6.0p3(ETA April 26th)
     
  14. JasonVSG

    JasonVSG

    Joined:
    Jun 22, 2016
    Posts:
    29
    We had a problem similar to TurnOnTheGames issue. However, we did find a work around yesterday.
    In the Dropdown>Template, change the system from Clamped to Elastic. We found that the issue is the same as having an auto content size fitter on a scrollable system. The position and size values would become NaN.

    Once we found that the panel had the same NaN results we tried elastic and boom. We had a work around.
     
    Mikael-H likes this.
  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    Yes the issue is in how clamping works so switching clamped mode off will work.
     
  16. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    247
    THAT was all I had to do??? Doh... :)
     
  17. ProgOrion

    ProgOrion

    Joined:
    Nov 27, 2016
    Posts:
    4
    I've just updated my Unity to the actual version. Still I'm facing this error:
    "my dropdowns are now blocking all input and not showing the content that should be inside while also preventing the user from selecting an option or closing the dropdown. At this point I believe the dropdowns are broken, I never had an issue using them in the past."

    Karl, when will you release a patch for this? It is very frustrating! Thanks!
     
  18. Mikael-H

    Mikael-H

    Joined:
    Apr 26, 2013
    Posts:
    247
    I think the patch 5.6 p3 has not come out yet. If ETA was 26th of april it's probably on its way
     
  19. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    5.6.0p3 is scheduled for today once QA have finished with it.
     
    Stephen_O and Mikael-H like this.
  20. ProgOrion

    ProgOrion

    Joined:
    Nov 27, 2016
    Posts:
    4
    Hello Karl,

    I've just updated to 5.6.0p3. Still, my dropdown doesn't work. It's very confusing. I click on it, it shows the options, but then I cannot select one, and sometimes I can't even close it anymore. Do you have any pieces of advice maybe?
     
  21. ProgOrion

    ProgOrion

    Joined:
    Nov 27, 2016
    Posts:
    4
    Thanks for your reply. Unfortunately, it's still not working. :/
     
  22. ProgOrion

    ProgOrion

    Joined:
    Nov 27, 2016
    Posts:
    4
    Hey guys,

    I'm sorry for yelling too much about my problem! :) It turned out to be a simple problem with sorting layers in my project. The dropdown works properly now. I really appreciate your feedbacks, have a nice day!
     
    Mikael-H and karl_jones like this.
  23. wahahada

    wahahada

    Joined:
    Jan 9, 2015
    Posts:
    1
    Hi,ProgOrion,
    I have the same problem. I've just updated to 5.6.0f3. My dropdown sometimes doesn't work. It's very confusing me. I click on it, it doesn't show any options, and I can't even close it anymore. Do you have any pieces of advice maybe?
     
  24. stefanob

    stefanob

    Joined:
    Nov 26, 2012
    Posts:
    30
    I also got that problem (option fields are empty) in Unity 5.6.0f3. Changing the ScrollRect Movement Type in the template to "Elastic" fixed it.
     
  25. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    This is fixed in patch 5.6.0p3
     
    Brogan89 likes this.
  26. FayyadSufyan

    FayyadSufyan

    Joined:
    Feb 25, 2016
    Posts:
    23
    Coming from version 5.6.5f1 the issue is still present, but only when building the game to my iPhone 5c iOS 9.3 (android works fine on editor and device).
    The dropdown is showing only one item and it is not clickable!
     
  27. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    Please file a bug report so we can look into it