- Home /
Sprite Based Score Rendering
I'm trying to understand the best practice for displaying multiple sprites for a scoring system from within a script.
Using Unity 4.3's sprite editor I've split a texture into the digits (0 to 9) and the other sprite based text (e.g. "combo" or "score"). I'd like to display a combination of these sprites as the combo or score is incremented (e.g. display "combo 12" if a 12-hit combo has been triggered). From my scoring script I've exposed a Sprite array in order to hold each sprite but I'm not sure of the best practice to render multiple sprites from this list.
Should I render a series of sprites using GUI.DrawTexture() from within the OnGUI method and use each number Sprite's texture and textureRect as parameters? Or can I add multiple SpriteRenderer components to render each digit?
Answer by MDL · Feb 06, 2014 at 01:46 PM
After much digging around it seems that GUIText supports bitmap font rendering:
http://www.booncotter.com/custom-bitmap-fonts-in-unity/
This seems to be the solution to custom font rendering.
Your answer
Follow this Question
Related Questions
What is the best way of creating a modular texture? 0 Answers
Why is my sprite not the original resolution? 2 Answers
I have an animaiton problem about sprite loading. 0 Answers
Different score for each sprite. 0 Answers
confusion with sprites. 0 Answers