I’m using 3D Text to display the title of the levels in my game. I want to make the text fade in when the level loads and fade out soon afterwards.
I have a material set to “GUI/Text Shader”, but I’m having trouble with adding font textures. I’ve tried importing fonts into the editor (I’ve tried Ariel and another one I found on the Internet), but all of the textures for the fonts come up as black squares (which I assume are transparent).
Is there any way to fix this?
2 Answers
2
First select the font in the project view, then do GameObject->Create Other->3D Text. That way it will automatically be set up with the correct font/material/texture.
Actually, GUI Text is the GameObject I need in this instance. It allows me to alter the alpha channel of the text easier than 3D Text. It’s how I was able to fade the level titles in and out when the scene loads. GUI Text is also easier to position, as the transform positioning is based on the anchor, not the world space.
The way I created the GUI Text is the same as with your method, except selecting GUI Text, instead.
This makes the object into a Text Mesh, not a 3D Text object. I also can't change the font color this way, as the material options are grayed out.
– RxanaduA TextMesh is a 3D Text object. If you want to change the color, then you need to make your own material; use the settings you get from doing what I described in the answer as a reference so you can make sure to do it correctly.
– Eric5h5