Hi,
I have a standard TTF font file and the code below to manipulate text, at the moment I only see bocks instead of text in the color of the renderer.
Any help would be much appreciated, what am I doing wrong here?
Thanks in advance,
Sid
GameObject textObj = new GameObject("Text");
textObj.AddComponent(typeof(TextMesh) );
textObj.AddComponent(typeof(MeshRenderer));
MeshRenderer meshRen = (MeshRenderer) textObj.GetComponent(typeof(MeshRenderer));
TextMesh textMesh = (TextMesh) textObj.GetComponent(typeof(TextMesh));
Material myMaterial = (Material) Resources.Load ("labelMaterial");
meshRen.material = myMaterial;
Font myFont = (Font) Resources.Load("Courier New");
//myFont.material = myMaterial;
textMesh.font = myFont;
textMesh.text = "HELLO WORLD";