Unity Enable/ Disable Button Code Example


Example: how to disable buttons in unity

Button.interactable = false; // Uses Disabled Color And Cant Click It Button.enabled = false; // Does Not Use Disabled Color And Cant Click It Button.gameObject.SetActive(false); // Removes It From UI Entirely

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable