title: Activate and deactivate GameObject per seconds
body: <p>I would like to make an object - Dragon Head, which burst flames for 5 sec and every 3 sec. But I'm not sure how to do this... My script actually looks like this:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class Dragon_Head_statue: MonoBehaviour {
  
  public GameObject openFire;
  
  private bool IsActive;
  
  void Update()
  {
      Invoke("OpenFire", 4);
  }
  
  void OpenFire()
  {
      IsActive = !IsActive;
      openFire.SetActive(IsActive);
  }
  
  }
  </code></pre>
  
  <p>So for now it works like it starts flaming and then it loop activate and deactivate... So it just won't work. I also tried other things like coroutines, InvokeRepeating without success.</p>