- Home /
special effect in gui button labels
what are the special effect that can we use with GUI.buttons and other Gui Elements like glowing button and other special effects and change the font inside the button and type text like type writer effects.Can U please tell all links related to special that we can add to gui elements
Answer by dissidently · Mar 07, 2011 at 04:43 PM
None. You'll need to do it all manually yourself, either in textures or with trick layering. Think like Photoshop Layers with various different forms of opacity and different effects applied to each layer to get desired result.
Now bang head against wall and wish for a better GUI in Unity3D. That banging of your head was the most effective part of your wishing process.
Now for some disappointing links.
can we able to give appearance inside gui elements through scripting any body having any idea
Answer by Bunny83 · Mar 07, 2011 at 07:02 PM
Just use GUIStyle or a GUISkin to define how the buttons appearance should look like. A GUISkin contains a collection of GUIStyles for all gui elements. You can use a GUISkin by assigning it to GUI.skin inside your OnGUI function.
Every GUIStyle have some general properties to define streching behaviour, border of the background image, margin, padding, wordwrap...
In addition you have 8 GUIStyleStates that define how the element should look like when the button / element is in a certain state:
normal, hover, active, focused
and
onNormal, onHover, onActive, onFocused
In these GUIStyleStates you can define a seperate backgroundimage and a textcolor that should be used.
GUIStyles can also be used directly on a GUI element by passing it to your Button / Label / ... function. If you use the label style on a button the button will work as before but will look like a label. A label with the style of a button will look like a button but can't be clicked of course.
Everything that isn't covered by the basic builtin state / behaviour settings have to be achieved manually. In general almost everything is possible but it's always a matter of creativity, time you wanna spend and the knowledge you have.
Good luck!
Your answer
Follow this Question
Related Questions
dirty lens effect over light help 1 Answer
Write a Shader for GUI (GUITexture or scripted GUI) 0 Answers
Gui Button zoom 1 Answer
How to make my label fade after 2 sec? 1 Answer
Polish letters in GUI - saving with UTF8 is not working 1 Answer