I’m having a little problem. I have an array of cubes that act as spawn positions and a prefab that includes text anchored to the top left. I want to be able to instaniate the text prefab at every cube in the array. Yet when I do this the text is anchored to the top left.

This is my script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectSpawn : MonoBehaviour {
public GameObject textPrefab;
public Transform[] spawnPos;
int count;
void Update ()
{
for (int i = 0; i < spawnPos.Length; i++)
{
TextCreate ();
count += 1;
}
}
void TextCreate ()
{
Instantiate (textPrefab, spawnPos[count]);
}
}
This make the text a child of the spawn positions, while still being anchored to the top left. How would I make the text position the same as the spawn position?
For extra info, the prefab is this:
vTextPrefab
vCanvas
Text
EventSystem
Hopefully this makes sense!
Thanks,
Dream.
I had an idea. Would it be possible to remove anchoring from the the text, so it could move freely?
If the text is meant to go “above” the game object in the world, you could use a world space canvas or you can set it up so the text is displayed in the screenspace (or viewport) area.
Is that what you’re looking for/thinking of?
That would work fine, but the idea I had would be to set the TextPrefabs X, Y and Z position to the same as the empty spawn position’s X, Y and Z position.
Although your idea sound like the best, so I will try it.
Thanks,
Dream
Well, they were 2 ideas. One sounded like what you were maybe trying to do already. Not sure if you were using a world canvas and was it setup correctly?
The other idea was something I’ve tried before and it works pretty well.
Hopefully you get it working. 
I’ve got it working, but with a few problems. One the text is very pixelated and blurry, two when the scripts spawn the text, the text is at least 4/5 grids in front of the spawn position.
For clarification, the green box is the spawn position (theres 5 of them, hence the 5 texts) and as shown they are way in front of the spawn positions.
EDIT: the text is normal in the scene view, it’s only blurry in the game view.
Dream
Well, got it working with what method? 
Setting the canvas to ‘World Space’ adding text and making that a prefab. I scaled the text down beacuse it was very large which could have caused the pixel effect.
Found the problem!
The TextPrefabs ‘Z’ position was 6, so it was 6 grids in front of the spawn position.
Thanks methos5k for the help! 
Dream
Great, glad you worked it out 