How to put space between instantiated objects?

string scoreText = score.ToString ();
for (int i = 0; i < scoreText.Length; i++){
var go = (GameObject)Instantiate(Resources.Load(scoreText*.ToString()));*
go.transform.localPosition = new Vector3(0, 0.08F, 0);
}
I am instantiating GameObjects which are numbers. They represent the ever changing score. When my numbers are initiated I need them to have some space apart. This should be simple but I’ve been stuck with this. Can someone point out how this is done please? I tried by adding space between characters to string scoreText but this just makes characters after the first character disappear.

string scoreText = score.ToString (); //text to display
float spacing = 0.1f; //spacing to use (just defined here so easy to fiddle with)

 for (int i = 0; i < scoreText.Length; i++){ 
     var go = (GameObject)Instantiate(Resources.Load(scoreText*.ToString()));*

//calculate x position by multiplying ‘i’ by our spacing
//i.e. character is at 2spacing, which currently is 20.1=0.2
float xposition = spacing*(float)i;

//set our transform, specifying our ‘xposition’ variable as the local x
go.transform.localPosition = new Vector3(xposition, 0.08F, 0);
}
You may have to fix some compile errors (didn’t test it), but that’s the right approach - use the ‘i’ value to calculate how much to offset your letter by.
Hope that helps
-Chris

可能是字体显示空间的限制,按照你的描述,你得文本框的overflow选的应该是clamp content,你可以试试把overflow的选项改为shrink content