title: How to load prefab properly
body: <p>I want to instantiate a Prefab by it's name (and path), which comes from my server, from my Assets folder and came across some issues.
  I found multiple ways of doing this:</p>
  
  <pre><code>var prefab = Instantiate(Resources.Load("prefabName")) as GameObject;
  </code></pre>
  
  <p>This is suggested by most threads but as described <a href="https://unity3d.com/de/learn/tutorials/topics/best-practices/resources-folder" rel="nofollow noreferrer">here</a> you should not use it.</p>
  
  <pre><code>var prefab = Instantiate(UnityEditor.AssetDatabase.LoadAssetAtPath&lt;GameObject&gt;(path));
  </code></pre>
  
  <p>This is the second way I found but this will only work when working inside the Editor. Building the project to a WebGl for example will immidiatly throw a build error.</p>
  
  <p>So what is the proper way to instantiate a prefab then?</p>