I am making a title screen, but I can't make the 3d text appear like, immediately after the laser-show finishes, or make it zoom into view. 3d text goes through all objects, so I cannot just put a cube over it and put a timed object destructor on it. What can I do?
Easiest way I can think of:
function Start()
{
var textMesh : TextMesh = GetComponent(TextMesh);
var originalText = textMesh.text;
textMesh.text = "";
yield WaitForSeconds(3);
textMesh.text = originalText;
}
Alternatively, set the textmesh's text to "" by default, then just get the textmesh component when your laser show finishes, and change the text to the right text
Edit (since you changed your tags to guiText):
function Start()
{
var originalText = guiText.text;
guiText.text = "";
yield WaitForSeconds(3);
guiText.text = originalText;
}
No OnGUI necessary
for 3d text to be occulted like any other surface : use this shader http://www.unifycommunity.com/wiki/index.php?title=3DText