Hey, fellas!
I’m attempting to avoid using the built in GUI from Unity, just because I think it’s a little messy. With the type of game I am making, I can easily get away with a certain way of building my text system. I am using Unity2D, and my sprites are usually about 16 x 16 or 32 x 32 in size, as I’m going for a retro look. Basically for my font system I just want to take a font (set up as a sprite sheet if I have to), and literally place it in my game relative to my player and draw the text just by using the literal sprite-sheet set up. I don’t want to make it to be in the GUI or “HUD”, I just want to draw it into the scene as if it were a sprite to avoid resolution aspect ratio issues. I hope that made sense, and any help with this would be awesome. Thank you in advance!
The TextMesh (or 3D Text) component in Unity behave in much this way. With the right font it would probably do exactly what you’re looking for.
You should use GUItext, it’s easy to use, much more than to have to set up each letter coordinates !
I’ve been using GUItext but it just flies all over the place when the window width is changed, so I want to avoid having to set the parameters. Everything in my game has to be placed exactly in the right spot via pixel placement so having an “approximate” position by setting the aspect ratio for GUItext just doesn’t work. Thank you for the input though!!! I will definitely try using a TextMesh and see what happens. You guys are awesome!
Ok so the TextMesh behaves perfectly… There is an issue though It’s extremely blurry! Because my game is so “tiny” (16 x 16 pixels and such) it’s reeeaaaaaallll blurry… But seemed to be blurry even in larger sizes. Anyway to clean that up?
Use a font that’s explicitly shaped like pixels(like this one), and in the font’s import settings, import it at a higher size (I usually go at least 60).