- Home /
Question by
dimitros89 · Mar 12, 2015 at 02:39 PM ·
gameobjecttextcubetextmesh3dtext
Insert 3d text to the front face of a cube GameObject
I have a cube which has a 3d text as a child.
I am using the below javascript to write on the 3d text:
#pragma strict
function Start () {
}
var countdown : int = 200;
function Update()
{
GetComponent(TextMesh).text = countdown.ToString();
}
}
I am trying to write/show the text to the front face(or very close) of the cube but i am failing. I tried almost every idea in this forum. Any ideas?
Comment
Do you have any errors in your console? Does text show up if you type it into the text-mesh text field? Do you have the script attached to the game-object with the text mesh or the cube above?
No errors. Text show up in the text-mesh. The script is attached to the text mesh. If i try to attach it to the gameobject it doesn't work.
"doesn't work"? How? Can you post a screenshot of your scene?