- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
Remo · Aug 21, 2012 at 03:12 PM ·
gui.buttonguicontent
How to add multiple lines of text in GUI.Button with different font styles?
I have a GUI Button inside which I have to add texture, name and a description. I have managed to add the texture and name using GUIContent. How to add another text in the button with a different font size and color?
var ballButtonContent : GUIContent = new GUIContent(" Ball", ballTexture);
if(GUI.Button(Rect(42,50,200,50), ballButtonContent))
{
//doSomething;
}
The font styles of the text are set in the GUISkin. Now if I do something like
var ballButtonContent : GUIContent = new GUIContent(" Ball\n Description", ballTexture);
Both Ball and Description will have same styles. How can I resolve this problem?
Comment
Your answer
