title: Instantiating a U.I object at the position of another object while keeping the Canvas as the parent
body: <p>Ran into a U.I problem that I am struggling to solve (UI is always an issue for me). Gist of the project is that I have an array of spawn points (Positions[i]), an array composed of enemy prefabs(Enemies[j]) and just a UI panel prefab with a text component (EnemyHUD). When I pass string names through a certain function, as long as there is a prefab with the same name and position available to it, it will load in the enemy. Now, for every enemy prefab loaded in, I would like a "EnemyHUD" prefab to instantiate at at the enemy positions and with text displaying the name of the enemy.</p>
  
  <pre><code>GameObject HUD = Instantiate(EnemyHUB, Positions[i].position, Positions[i].rotation);
  </code></pre>
  
  <p>This line spawns the EnemyHUD prefab at the right location but its Instantiates them outside of the canvas so they show up as red x's. So I added this:</p>
  
  <pre><code>HUD.transform.SetParent(GameObject.Find("Canvas").transform, false);
  </code></pre>
  
  <p>This fixes the issue of Instantiating outside of the canvas but also (irritatingly)resets the Instantiate position and embarrassingly, I'm not sure how to set it back while making sure it stays a child of the Canvas. Have not event touched the name change part yet.</p>
  
  <p>I have been working on this this since last night and while I got a lot of different results experimenting, none have been the one that I want. Very much still a novice, so I am sure it is looking me in the face so please help me find it.</p>