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
0
Question by antx · Jul 05, 2013 at 06:09 PM · selectguiskinbutton backroundcustom style

how to use the default skin in a custom stlye?

I added a custom stlye to my GUISkin and want to use the default button background for it. However, I don´t see how to select it.

The "Button" style in that Skin uses the background of the default unity skin (button).

My custom stlye has currently "none". When I open the "Select Texture2D" Window, I see all my own textures in the list, but not the unity default texture.

There is no way to drag and drop it, or copy and paste it. How do I get it into my custom style?

Comment
Add comment · Show 4
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 create3dgames · Jul 05, 2013 at 10:04 PM 0
Share

I'm not entirely sure what you're asking...but I think what you want to do is download the default Unity GUI skin (I'm pretty sure it's on the Asset Store) and use the button texture from it.

avatar image antx · Jul 05, 2013 at 10:51 PM 0
Share

The point is that those textures are there already since the standard buttons use them. So why can I not use them for any custom styles that I add? All I would need is to be able to select them.

I made now my own texture. This is overhead but what ever...

THX anyway for your help.

avatar image create3dgames · Jul 05, 2013 at 11:30 PM 0
Share

Yes, those textures are there already, but they are...built in. If you want to use them, you'll have to download them and then put them in your project, and then you will have a duplicate set of the textures, which will not be built in and you can use them. Simple.

avatar image Slobdell · Jul 06, 2013 at 12:59 AM 0
Share

When you create a skin it starts with all the defaults, just don't change them

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by raannnndommm · Jul 06, 2013 at 12:49 AM

It is available on the asset store.

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
avatar image
0

Answer by AllenKashiwa · Sep 29, 2016 at 10:35 PM

@antx I can't find a way in editor. But you can try this in code:

 GUIStyle customStyle = GUI.skin.GetStyle("custom");
 customStyle.normal.background = (Texture2D)Resources.GetBuiltinResource(typeof(Texture2D), "GameSkin/window.png");
         customStyle.onNormal.background = (Texture2D)Resources.GetBuiltinResource(typeof(Texture2D), "GameSkin/window on.png");


code above is for window. You can change button style the same way:

 gUISkin.button.normal.background = (Texture2D)Resources.GetBuiltinResource(typeof(Texture2D), "GameSkin/button.png");
             
             gUISkin.button.hover.background = (Texture2D)Resources.GetBuiltinResource(typeof(Texture2D), "GameSkin/button hover.png");
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
avatar image
0

Answer by TriaDev · Dec 22, 2021 at 11:32 PM

hey @antx I hate to rez a very old thread, but the solution is simple and might help someone. Just copy the image from the skin style you want and paste it into the skin style you want to replace. Example: to put back the original button normal background image 1) create a new skin. 2) open the button style fold out. 3) right click in the normal background image field and select copy. 4) go to your other skin (where you want the to replace the button image). 5) in that skin's button normal background image field, right click and paste. cheers

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

20 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 avatar image

Related Questions

GUI Button + GUISkin = Bug, Help? 1 Answer

Can't change button GUIStyle background. 1 Answer

Select random object from array 2 Answers

Object picking from the scene view 1 Answer

Swipe Drag Select Gameobjects :( ? 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