Displaying String and normal text in 3D Text GameObject

Hello, I think this should be a fairly simple thing to do, but I haven’t been able to find the answer anywhere. In another language, this might look like

String Answer;
Answer = “Ten”;

print ("The answer is " Answer “. If this is what you got, good job!”);

Is this possible to do with Unity’s 3D Text object?

Never mind. Figured it out.

var textObject:GameObject=GameObject.Find("AnswerText"); //Sets textObject equal to the contents of the 3D Text Object named AnswerText
var textMesh:TextMesh = textObject.GetComponent(TextMesh); //Gets the mesh component off of that game object     
var answer:String = "Ten"; //Creates a string called Answer and sets its value to "Ten"        
    
textMesh.text = "The answer is " + answer; //Changes the 3DtextObject's text to "The answer is Ten."

It’s pretty much exactly what you wrote:

String Answer;
Answer = "Ten";
GetComponent(TextMesh).text = "The answer is " + Answer + ". If this is what you got, good job!";