Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 rule62 · Mar 13, 2011 at 07:09 PM · guiscenelevellayer

Best way/place to implement GUI? (scenes/levels/layers? - opinions wanted)

So, I'm going to have 2 types of GUIs in my project.

One is a constant set of tools/buttons/whathaveyou that is always "on".

Two, I'd also like to have a "settings" menu that the user can open up and change.

My question is what is the best way/location to implement these things? As separate scenes, layers, or levels? That's the core thing I'm looking for opinions on.

Thanks for any guidance!

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

2 Replies

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

Answer by Ashkan_gc · Mar 13, 2011 at 08:22 PM

scenes are not generally a good concept to manage code with them. levels and scenes are the same. i recommend creating components for each of your GUI panels and attach those components to some sort of manager objects. then add those manager objects to scenes that you want to have the GUI.

about your settings menu you can do this too. you should just check for pressing a key like ESC or create a drop down menu using unity GUI. i don't know what exactly you want.

Comment
Add comment · Show 1 · 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 rule62 · Mar 13, 2011 at 11:04 PM 0
Share

Thanks. It was just a general question. The "settings" menu will be some controls over how a scene is rendered (colors of gameobjects, etc).

avatar image
1

Answer by Statement · Mar 13, 2011 at 08:47 PM

I'd create a prefab and have each game level include that prefab. Alternatively have a script that creates the prefab during Awake or Start. Some people might use some sort of object that is DontDestroyOnLoad in the main scene but then you'd be having a hard time editing/testing/debugging levels since you'd have to load the main scene first to include them. Since you can't easily swap between scenes (and remember all of the scene states), going with a menu in a dedicated level can become troublesome. If you still opt to go with that route, you could probably do some tricks with additive level loading. However I personally think a prefab/script in each level is the best choice.

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

No one has followed this question yet.

Related Questions

is possible to load a scene from external file ? 1 Answer

Layer hidden in Scene view, visible in game 3 Answers

How can I save the player's progress in-game? 1 Answer

How to load a different prefab using the same scene? 1 Answer

Need to link a button to next level 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