hide ui button unity code example
Example 1: hide button unity
GameObject button;
void Start() {
button = GameObject.Find("Button");
}
void ButtonClicked() {
button.SetActive(false);
}
Example 2: how to hide ui elements unity
GameObject.Find("the object name").SetActive(false);