title: Unity 5.6 - C# - Adding a GameObject to another GameObject with AddComponent<T>
body: <p>The function I'm currently working on instantiates a GameObject (using a prefab). I store this <strong>GameObject</strong> in a local variable</p>
  
  <pre><code>GameObject tmpObject;
  </code></pre>
  
  <p>Works flawlessly. Next I try to assign this GameObject to my GameObject representation of my Vive controller, which looks like this:</p>
  
  <pre><code>tmpObject = tmpController.gameObject.AddComponent&lt;GameObject&gt;() as GameObject;
  </code></pre>
  
  <p>The error that I get is that UnityEngine.GameObject cannot be converted to UnityEngine.Component.</p>
  
  <p>Am I missing a simple / basic there? I tried adding a SphereCollider as per Unity's <a href="https://docs.unity3d.com/ScriptReference/GameObject.AddComponent.html" rel="noreferrer">official guidline</a> and it did work, so why can't I add GameObject? Is there a workaround to adding GameObjects to another GameObject? Any help is greatly <strong>appreciated</strong>!</p>