I am essentially trying to create a word game where the char array will take the string and break it down into characters. This all works fine. The problem I am having is that for some reason the letters are not displaying correctly, as shown in the screenshots below. There are no other scripts in the scene at this time, and the script is attached to the main camera.
Game View:
Console View:

Inspector View:

Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Word_Generator : MonoBehaviour
{
[SerializeField] private char [] char_Word;
[SerializeField] private GameObject go_Anchor;
[SerializeField] private GameObject go_Letter;
[SerializeField] private List <GameObject> go_Letters = new List <GameObject> ();
[SerializeField] private string str_Word;
private void Start ( )
{
str_Word = str_Word.ToUpper ( );
char_Word = str_Word.ToCharArray ( );
for ( int int_LetterCount = 0; int_LetterCount <= char_Word.Length; int_LetterCount++ )
{
if ( char_Word [ int_LetterCount ] == ' ' )
{
// Insert Code For Space
Debug.Log ( "Space" );
}
else
{
// Instantiate the Letter Space
go_Letters.Add ( go_Letter );
Instantiate ( go_Letters [ int_LetterCount ], new Vector3 ( go_Anchor.transform.position.x, go_Anchor.transform.position.y, go_Anchor.transform.position.z ), Quaternion.identity, GameObject.Find ( "Canvas" ).transform );
// Set Letter
go_Letters [ int_LetterCount ].GetComponentInChildren<Text> ( ).text = char_Word [ int_LetterCount ].ToString ( );
// Make Space
go_Anchor.transform.position = new Vector3 ( go_Anchor.transform.position.x + 110, go_Anchor.transform.position.y, go_Anchor.transform.position.z );
Debug.Log ( go_Letters [ int_LetterCount ].GetComponentInChildren<Text> ( ).text );
}
}
}
}
