- Home /
dropdown getting focus when clicking on button
I have the following setup used as an options menu for changing the resolution from withing the game. I can confirm that it works with one little problem. The drop down menu i getting a very weird activation.
here is a video demonstrating the issue. I am still learning so it may be may mistake but I have no clue why this happens. Any help would be appreciated.
The function that is called when the apply button is clicked. The behavior can be seen when either of the buttons are called.
public void OnApply() => gm.OptionsManager.SetResolution(selectedResolution, true);
the back button is wired through the editor to hide the current menu and show the previous one;
EDIT: I did a quick test scene with the UI components and no actual functionality wired to them either with code or withing the Handlers in the edit, and the issue still persists.
Can you show us the function that fires when the button is clicked?
I have updated the question. However I don't see why the code may be the problem as the back button is not wired to any script and it the behavior is still present
The dropdown shows it's items if dropdown.Show() is called. If you are not calling this from anywhere or have it hooked to the OnClick functions of the buttons I can't think of anything else. Have you tried turning the navigation to Off?