title: The Object you want to instantiate is null
body: <p>I am trying to instantiate a prefab from resources folder using the name from a text file located in my resources folder. Prefab is also located in my resources folder. However, I get an error saying "the object I want to instantiate is null".</p>
  
  <p>When I directly give the name of prefab it works. I cannot seem to understand the issue.</p>
  
  <p>My code is :</p>
  
  <pre><code>public void Loadd() 
  {
      TextAsset txtasset = (TextAsset)Resources.Load (txtfile);
      txtcontents = txtasset.text;
      string[] linesinfile = txtasset.text.Split ('\n');
      for(int i= 0; i&lt;1; i++)
      {
          for (int x = 0; x &lt; buttonholder.Length; x++)
          {
              //GameObject Instance = Instantiate (Resources.Load ("F260001", typeof(GameObject))) as GameObject;   // works
              string name = linesinfile [x];
              Debug.Log (name);
              GameObject Instance = Instantiate (Resources.Load (name, typeof(GameObject))) as GameObject;
           }
       }
   }
  </code></pre>