This is a long shot but maybe someone stumbled upon a similar case.
I have several runtime UI documents and after upgrading unity from 2021.3.4 to 2022.1.19 all of my dropdowns stopped showing options popup.
There were no changes to the documents or styles whatsoever besides upgrading. The rest of the UI works just fine, buttons with hovers reacting to presses, etc.
I also cleared all global CSS, the dropdown options menu is working just fine when previewing in UI Builder but just won’t show in the runtime.
I’ve tried on an empty project with sample content from the asset store and didn’t have any issues with that, so there must be something in my project, but I don’t know what could cause during upgrading the unity version.
oh crap, this is bat shit crazy. It requires a lot of effort to break such basic functionality I guess. Anyway, big thanks @Kichang-Kim for letting me know
var elem = root.focusController.focusedElement;
if (elem == null)
{
return;
}
if (elem is DropdownField)
{
var ev = KeyDownEvent.GetPooled(default(char), KeyCode.KeypadEnter, EventModifiers.None);
elem.SendEvent(ev);
}
Bind this to an InputAction and you’re done, that’s what I use to make it work with gamepad.