- Home /
how to set a texture and another font in a GUI Text
I got one problem. I have a javascript for my menu, with the buttons and a font. But the problem is. The button has a standard look.( The look like http://unity3d.com/support/documentation/Components/gui-Basics.html ) I got a texture for the buttons, it calls _tex_buttons and another font calls kartika. But i don't know how to fix it in the script. Can someone help me?
THNX
Answer by Hei · Feb 26, 2011 at 02:31 PM
You can use GUISkin to change the texture and another font
Project/Create/GUISkin
and use this script
var mySkin : GUISkin;
/* Example level loader */
function OnGUI () { // To change the GUI Skin GUI.Skin = mySkin
// Make a background box GUI.Box (Rect (10,10,100,90), "Loader Menu");
// Make the first button. if (GUI.Button (Rect (20,40,80,20), "Level 1")) { Application.LoadLevel (1); }
// Make the second button. if (GUI.Button (Rect (20,70,80,20), "Level 2")) { Application.LoadLevel (2); } }
it can use to all script if you call GUI and change the texture and font.
Answer by Ilias · Feb 26, 2011 at 05:45 PM
THNX it works. Thnx a lot. You was right. It works perfect.
Your answer
Follow this Question
Related Questions
DrawTexture GUI iPhone 1 Answer
Menu Animation 2 Answers
Greek name of picture problem 1 Answer
GUI Info button not displaying 1 Answer
Change GUI.Button Texture on runtime 1 Answer