Hello everyone,
in recent weeks we switched from Unity 5.3.6p7 to 5.4.3p3 and found a strange bug on the management of UI elements that would not show up in the previous version of Unity.
In our game we have the menu made by different CanvasGroup that we show up and hide while the user move around in the menu.
To achieve this we turn off the old canvas and turn on the new one with the following code:
newOne.alpha = 1;
newOne.interactable = true;
newOne.blocksRaycasts = true;
oldOne.alpha = 0;
oldOne.interactable = false;
oldOne.blocksRaycasts = false;
This code works great in Unity 5.3.6p7, in fact if for example in the main screen of the main menu you press the “options” button, this button calls his OnClick function and then it loses his state of highlighted in the param “Current selection state” returning to the normal state.
When we switch to 5.4.3p3 we found that something has changed in the UI management. In fact if the user submit the button “options” with the keyboard or a controller everything works like in the previous version, but if a user click the button “options” with a mouse or with a finger this button calls his OnClick function but it doesn’t lose his state of highlighted.
Someone in Unity knows a way to solve this problem?
Thanks for the attention
Tobia