title: UNITY - Make a gameobject inactive and active
body: <p>I have game objects which is button (Called as tiles), when the button is clicked it will be inactive and there's a condition to be tested if the condition is true the button will be destroyed but if its false the button will back to its active status.</p>
  
  <p><strong>My game Manager script (The condition):</strong></p>
  
  <pre><code>public void checkword()
   {
       wordBuilded = displayer.text.ToString();
  
       if (txtContents.Contains(wordBuilded))
       {
           Debug.Log(wordBuilded + " Is on the list");
           wordScore++;
           Debug.Log(wordScore);
       }
       else
       {        
           Debug.Log("Someting is wrong..");
           FindObjectOfType&lt;LetterTiles&gt;().tileStatus();
       }
  
   }
  </code></pre>
  
  <p><strong>On my Button (Tile) script (Script attached to the buttons):</strong></p>
  
  <pre><code>public void letterClick()
   {
       gameManager.currentWord += letter;
       gameObject.SetActive(false);
  
   }
  
   public void tileStatus()
   {
      gameObject.SetActive(true);
   }
  </code></pre>