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

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
3022052--225797--dropdown box bug.png
Game view: In this image you can see the items of the dropdown positioned in world space.

3022052--225798--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.

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…

3 Likes

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.

1 Like

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 :smile:

Bug reported https://fogbugz.unity3d.com/default.asp?900098_13bkjj0bsiq8fmmj
Ticket number: 900098

I believe I fixed this last week. I will backport it to 5.6 as soon as I can. Unfortunately there is not a workaround for this as the issue is in the C++ side. Unity Issue Tracker - [UI] Button does not interact after nested canvas is used

2 Likes

So this will be fixed in 5.6p2 then I guess?

Possibly. Can’t say for sure until it goes into the patch but I will try to get it into that one.

1 Like

I am facing the exact same issue :confused:

Yes the drop down is either one of two bugs which are both now fixed. Should be in an upcoming patch.

2 Likes

Nice! Keep up the good work!

1 Like

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!

No its not in the patch yet. Should be in the next one 5.6.0p3(ETA April 26th)

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.

1 Like

Yes the issue is in how clamping works so switching clamped mode off will work.

THAT was all I had to do??? Doh… :slight_smile:

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!

I think the patch 5.6 p3 has not come out yet. If ETA was 26th of april it’s probably on its way

5.6.0p3 is scheduled for today once QA have finished with it.

2 Likes

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?