- Home /
GUI letters number text custom
Hey all, this is a Part 2 to my post;
This is in regards to the Letter objects on screen (unless they are one object and a script dynamically chooses co-ords to display different parts of it?) UPDATE: Turns out it is one texture atlas
GUIText.text = "Score: "+ playerScore;
Would i need to make a custom GUI method/function that relates a co-ord or object (letter, number) to a certain character (a,b,c....1,2,3...etc)?
Thank you!
UPDATE:
Ok i've found that it is a single texture and atlas'ing is most likey used...
So how would they script a character to be displayed.. I 'm thinking there are say for a 3 digit display, there'd be 3 separate duplicated objects.. and the script would trigger which index to show via comparison from Char to index?
Hey there, i know it's a big hard to understand what i'm trying to say, its a big concept i'm trying to grasp.
Basically... If say we have an atlased texture which letters.
And 3 standard Quad objects next to each other with the same material.
How would I script, using the UV co-ords of the atlas, displaying what character i want from say a string?
You can use UIToolkit, it makes that sort of stuff pretty easy. http://forum.unity3d.com/threads/87917-Prime31-UIToolkit-$$anonymous$$ulti-Resolution-GUI-Solution-Ready-for-Use...and-it-s-free
In the future please put some effort into checking your spelling and grammer before posting, it will improve the chances of someone helping you.
Touche, I was bit rushed wasn't I, lol. I generally am pretty anal about grammer & spelling to a degree.
Appreciate your input @petroz
Thought the last part of my question is still valid in the sense that; i'd like to know how would be the best way to assign a UV from the atlas to the Object on screen from a string and/or int ?
Your answer
Follow this Question
Related Questions
GUI using custom graphics - GUI approuches 1 Answer
How do i take a string from a gui and show it in the gameworld c# 1 Answer
How do i make my chat window save messages and be a scrolling GUI 0 Answers
How can I move Text and Image component in unison inside of Canvas 0 Answers
GUI Text rendering problem in WebGL 3 Answers