- Home /
GUI using custom graphics - GUI approuches
Hey everyone, i'm at the point of a game build where i need to develop the GUI.
Previously i've used custom GUIskins, and also GuiText/GuiTexture setups.
But i know little about this method or what is going on here - i have seen it setup in this manner a few times and want to understand more about it;
This is a picture from Zombieville USA, showing their Unity screen from an article.
They have all there GUI elements off-screen but in the scene, same with all their letter objects.
MY QUESTION
I assume they do this to save on redrawing the GUI and obviously use there own methods to show this GUI, either being a 2nd camera or what not, Do they enable/disable the different objects? do they move them into view? Basically I dont understand this approach?
I hope i make sense and someone can make light of what and how this approach works. Thank you.
UPDATE: ok so it is one texture, most likey atlased and displayed for PrintScreen purposes, unless anyone has other insight?
I have a 2nd part question to this at - http://answers.unity3d.com/questions/128205/gui-letters-number-text-custom.html
which im also tackling!
Answer by demize2010 · Jun 10, 2011 at 12:59 AM
Hey man,
From their article:
"The largest textures used were for the backdrops and main menu, which allotted 512 512 texture space. Characters are 128 128, and the houses where slightly higher at 256 512. Additionally all elements in the UI were comprised of a single 512 512 texture which includes the store you encounter between each level. So with that said, during my play through I rarely encountered any frame rate drops, the iPhone handled the on screen elements quite easily even with scores of baddies on screen."
Looks like standard atlasing to me and they've set that up for a screen grab? Could be wrong of course. You should check out Sprite Manager 2, it does a lot of the stuff mentioned in that article with ease :)
Hey man,
Ha, I didn't put 2 and 2 together when they said that line, so it is a single texture,one part solved! haha.
And im with you, I was thinking they put all the elements in for a screen grab, not actually during gameplay.
And i have lightly looked at Sprite $$anonymous$$anager 2, so it does atlasing with ease etc? ... i had a 2nd part to this question that i put up as - http://answers.unity3d.com/questions/128205/gui-letters-number-text-custom.html
To deal with, how they script ease character to be displayed.. I was under the impression of separate object.. but if it is say atlasing - then say 3 object would be up - and the script would trigger which index to show via comparison?
Haha that was long winded sorry!
Thank you for your insight man!
I'm not 100% sure, but I suspect they were using seperate objects and then selecting what part of the atlas to use by UV's ;)
S$$anonymous$$2 has all sorts of very nice atlasing stuff, want 50 animated characters in a single draw call? It's got you covered :)
Oh and check out EZ gui from the same guy, if your wanting custom fonts et al it should be able to that (plus it intergrates tightly with S$$anonymous$$2)
You'll be putting yourself in a hole with these solutions but saving a lot of time and headache ;)
Touche, its's like; obviously im pretty new to scripting, so this would be a much neater and faster way todo something that Unity already makes neat enough for the seasoned.
But i'm trying to force myself to learn what is going behind he scenes and not add extension after extension haha! Thanks alot for your input @demize2010 !
I'll accept your answer because it explained exactly what I wanted to know.
Your answer
Follow this Question
Related Questions
GUI letters number text custom 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
Unity 5.5 all GUI Text was enlarged. 0 Answers
GUI Draging 1 Answer