Skip to main content
2 of 2
added 62 characters in body
Vaillancourt
  • 16.4k
  • 17
  • 56
  • 61

Find operation are costly operations: try to avoid them.

Make a public List and assign your buttons to that List and then iterate the List.

   public List<GameObject> allButton; // it will show in your inspector assign (Drag and 
                                      // Drop) all your buttons to this list. 

   public void ShowAllButtons(){

      for(int index=0; index < allButton.Count; index++ ){
         allButton..SetActive(true);
      }

   }