- Home /
UIButton highlighted color not working
After using bellow script and when my buttons activated their highlighted color didn't work, how I can fix that?
void Update()
{
if (HidePanel.active)
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
NewButton.SetActive(false);
LoadButton.SetActive(false);
OptionButton.SetActive(false);
ExitButton.SetActive(false);
Cursor.visible = false;
}
if (ButtonOn.active)
{
Cursor.lockState = CursorLockMode.None;
//Cursor.lockState = CursorLockMode.Confined;
Cursor.visible = true;
NewButton.SetActive(true);
LoadButton.SetActive(true);
OptionButton.SetActive(true);
ExitButton.SetActive(true);
}
}
Comment