I found it severely inconvenient that UI components do not have a "ToggleActive()" method.
Let's say you want to implement a button that toggles some other UI component's visibility state. You would have to prepare two buttons on the top of each other, assigning callbacks like this:
Button1:
Something.SetActive(true)
Button1.SetActive(false)
Button2.SetActive(true)
Button2:
Something.SetActive(false)
Button2.SetActive(false)
Button1.SetActive(true)
Or write a script that...
"ToggleActive()" callback function for UI components?
Let's say you want to implement a button that toggles some other UI component's visibility state. You would have to prepare two buttons on the top of each other, assigning callbacks like this:
Button1:
Something.SetActive(true)
Button1.SetActive(false)
Button2.SetActive(true)
Button2:
Something.SetActive(false)
Button2.SetActive(false)
Button1.SetActive(true)
Or write a script that...
"ToggleActive()" callback function for UI components?