So here is my idea but I am not really sure how to implement it. I want to develop a script that evaluates what the user types in a string into a public field or even the Text Mesh component. This script will run through each letter of what was typed and instantiate the corresponding 3D model. So in essence, I can create all the characters of the alphabet in 3D and export them into Unity. When I type into the text field and hit play…the script will display the 3D models of the characters.
Positioning, size and readability don’t matter so much here. I just wanted to know if it was possible and maybe some ideas on how to start it.
I am newbie when it comes to C#, but I figured out that you can use something like this to display when a textobject contains a certain string.
GetComponent<TextMesh>().text = test;
if (test.IndexOf("this") != -1)
{
Instantiate(textObj, transform.position, transform.rotation);
Debug.Log("string contains 'this'");
}
I know realistically, that I need to do some sort of Loop in order to check each character of the string and then match it to the corresponding 3D Model. Thoughts? Comments? Am I sort of on the right track?
Thanks for reading and for any help or suggestions you might have.