I have a GUI set up with textfields and want to be able to get the text from there and set the 3D text as what is entered. What is the simplest way to accomplish this? I am using c#.
1 Answer
1public string stringToEdit = “Hello World”;
public TextMesh textmesh;
void OnGUI() {
stringToEdit = GUI.TextField(new Rect(10, 10, 200, 20), stringToEdit, 25);
textmesh.text = stringToEdit;
}
Thank you I wasn't using the correct string variable in the text-field arguments.
– KenE