- Home /
Why is text so boring in Unity?!
Hi I was wondering if there was a way in unity to make the GUIText more exciting.
Basically I want to have a GUIText grow and fade out after being created.(Much like a particle)
The only solution I have found is to import a bunch of different fonts and make them a slightly larger than the last and slightly change the color. Then in a script change the font of the GUIText to the different imported fonts over time. This method seems uneloquent and overall just ugly. Plus it is not as smooth as particle effects.
Is there something I am missing? How can I animate GUIText so it is pretty/smooth? Also if this is not possible I have come up with another solution. Which is to make a script which will accept a string as input and spit out a Texture2D which is a compilation of Texture2Ds that correspond to the letters/numbers in the string.
public Texture2D letterA;
public Texture2D letterB;
etc ...
a basic psudocode of how i expect this would be done would be
Texture2D.PackTexture(myArrayOfLetters,2)
or something of that nature.
then I would set the texture for a particle emitter to that Texture2D produced by my script. Also the particle emitter would only generate one particle.
Anyways this is my issue I would love to be corrected because then I would not have to code the whole PackTexture solution.
Answer by Eric5h5 · Mar 14, 2012 at 12:59 PM
Text is only as boring as you make it. GUIText objects are GameObjects and as such can be animated the same way as any other objects, including position, scale, and material. (Keeping in mind they use viewport coordinates rather than world coordinates, and can't be rotated, though you could potentially use 3DText instead.) Importing a font at a bunch of different sizes is definitely the wrong thing to do.
Your answer
Follow this Question
Related Questions
Non-uniform scale textures in GUI 1 Answer
Check if GUI is Pressed 1 Answer
GUI Text Component Rotate ? 1 Answer