Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
-1
Question by UniqueProductionZ · Feb 09, 2014 at 12:46 AM · guitextureguitexturebackgroundmainmenu

Changing Font, Background/Style of GUI Buttons

Hello Everyone! I am working on my Main Menu for my RPG Game and i have made 3 GUI Buttons, All three buttons work and they are in the correct position and correct size. However they are dull and boring and I really want to change the font, background or style of GUI. I want the background to be behind the text so the user can still see the text of the GUI Button. I have tried many tutorials on how to do this but i get confused on how to create the Texture, How to import it into my scene/project and then how to make it the background of my GUI button. I have found many tutorials however most of them are C# when I don't use that and I do not understand it either, So I use Javascript. Here is my Main Menu so far: var MainMenuScene: String;

 function OnGUI(){
 
 if(GUI.Button(Rect(Screen.width /2 - 100,Screen.height /2 - 50,250,50), "Main Menu")){
             Application.LoadLevel(MainMenuScene);
             Debug.Log("Game Started!");
         }
         
         //Make Change Graphics Quality button
             if(GUI.Button(Rect(Screen.width /2 - 100,Screen.height /2 ,250,50), "Options")){
             Application.LoadLevel(MainMenuScene);
             Debug.Log("Options: Loaded");
         }
         
         //Make quit game button
         if (GUI.Button (Rect (Screen.width /2 - 100,Screen.height /2 + 50,250,50), "Quit Game")){
             Application.Quit();
             Debug.Log("Game Closed!");
         }
     }

If anyone can tell me how i would add a texture to that then please tell me and I would very appreciate it. Also could you tell me how i would make the texture in Photoshop and how i would import it into Unity such as how big the texture would be to fit the GUI Button.

Thanks in advanced

UniqueProductionZ

P.S - I'm sorry for asking a rubbish newbie question, I'm new to Unity.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image UniqueProductionZ · Feb 12, 2014 at 06:50 PM 0
Share

Bump, Bump, Bump. Please i really need this answered cause i have got 2 buttons red but then one of the are the default color and wont change, any ideas?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DajBuzi · Feb 12, 2014 at 06:55 PM

Check the dpcumentation about GUI Style. Documantation gives you more information than anyone can give you here.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to make a GUI Texture (image) transparent? 2 Answers

Resizing multiple GUI Textures to remain together 0 Answers

Show GUI texture on collison 1 Answer

Why do my GUI.button Background Colors Not work? 1 Answer

How to script GUI Texture Window to see it in Script (Object's component) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges