- Home /
Question by
AlexRoseGames · Feb 12, 2017 at 10:23 PM ·
uibuttoncanvasbutton trigger eventsbuttonstates
Highlighted buttons stay highlighted when I deactivate a canvas. No way to unhighlight them.
In Unity 5.4/5.5, if I disable a canvas, then enable that canvas again and have a new button set to be highlighted, the original button does not dehighlight unless I hover over it again. So users can highlight the entire menu.
This wasn't a problem in 5.2. I can't stay on 5.2 to launch on Playstation, and this is ruining my launch schedule - is there any fix for this? I would have to completely stop using your highlighting system and write my own.
Here is a video of the behaviour:
Comment
Best Answer
Answer by AlexRoseGames · Feb 17, 2017 at 12:44 PM
SOLVED.
I had to do UnityEngine.EventSystems.EventSystem.current.SetSelectedGameObject(null); BEFORE disabling the canvas.