Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by The-Oddler · Sep 03, 2011 at 03:56 PM · guidefaultguiskin

Changing default GUISkin

Hi,

I made one GUISkin for my entire game and would also like that any GUI call uses this one by default. I know you can set the GUIskin by "GUI.skin = mySkin", but I have a few questions about this:

1) Can I make it so I don't even have to write that line of code ? Just change the default GUISkin in my game settings ?

2) When I use "GUI.skin = mySkin" will ALL GUI calls use this then, even the ones in other scripts? And when a new scene is loaded, will the new GUI skin be used ?

3) When I can't change the default GUISkin and "GUI.skin = mySkin" is for everything, is there a build-in way to let a script be executed at the start of the game (without having to add it to an object)? So I can just write the "GUI.skin = mySkin" line once there and it works ? :P

Thanks !

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by syclamoth · Oct 22, 2011 at 02:08 PM

  1. No.

  2. Yes.

  3. No. However, it's really not that hard to just put it at the top of any one of your GUI scripts (as in, in Awake()), which amounts to the same thing.

Comment
Add comment · Show 3 · 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 The-Oddler · Oct 22, 2011 at 02:33 PM 0
Share
  1. Ooh :(

  2. Yey :D Thanks

  3. I know :P But it's just more convenient to have one place to set this (there might be more stuff I want to set there)

Thanks ! :D

avatar image syclamoth · Oct 22, 2011 at 02:35 PM 0
Share

If you want to put a bunch of init settings in one place, you could have an empty gameObject with a single script on it (your initialisation script), then set up in the Execution Order settings so that that script is guaranteed to execute before anything else in the scene. If it's that important, it could even auto-destroy itself when it no longer has anything to do!

avatar image The-Oddler · Oct 22, 2011 at 02:39 PM 0
Share

Thanks ! I'll look into the execution order thingy :P

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

GUI.skin Does not persist on next loop through is this a bug? 0 Answers

GUI does not contain a definition for `skin' ? 1 Answer

Using GUISkin with Hierachy Objects 0 Answers

Unity Editor script arrows to display a variable 2 Answers

Changing GUI skin CustomGUI by script 0 Answers


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