title: Find inactive GameObject by name, tag or layer
body: <p>First, I need to deactivate a game object and then after 10 seconds, activate it, so I thought coroutines are suitable:</p>
  
  <pre><code>IEnumerator BarDeactivate(float sec)
  {
          yield return new WaitForSeconds(sec);
  
          var obj = GameObject.Find("OBJ");
          obj.SetActive(false);
  }
  
  IEnumerator BarReactivate(float sec)
  {
          yield return new WaitForSeconds(sec);
  
          var obj = transform.Find("OBJ");
          obj.SetActive(true);
  }
  </code></pre>
  
  <p>Obviously, I can no longer use <code>GameObject.Find</code> so I use <code>transform.Find</code> to find the <strong>inactive</strong> game object, but of course <code>.SetActive</code> now does not work, since obj is not actually a game object...</p>
  
  <p>How do I cast the found transform, so that it can be set active again?</p>
  
  <p>I tried <code>obj.gameObject.SetActive(true)</code> but it must be wrong, because the object would not come back to life...</p>