How to defocus / deselect a UI Button c#
In a basic menu system, I hide a menu object that has button in it when a user clicks a button and unhide another menu object. The problem is when I unhide back the menu object that is hidden after a button is clicked the button remains pressed. How can I depress / defocus / deselect a button.
Menu Object 1 + buton 1 (hides Menu Object 1 and unhides Menu Object2) + buton 2 (does something)
Menu Object 2 + buton 3 (hides Menu Object 2 and unhides Menu Object1) + buton 4 (does something)
button1 remains pressed / focus untill another button is clicked
Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220612071254im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How would i modify my current script to remove these UI buttons without killing my pause menu? 1 Answer
Method Skipping Inputs 2 Answers
How do I destroy a Instantiated UI Image that is a prefab but is pused on the Canvas? 0 Answers
Programatically creating and setting UI image 0 Answers
How do I destroy a instantiated UI image that is a prefab but pushed the canvas? 0 Answers