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
1
Question by DayyanSisson · Aug 22, 2011 at 12:37 AM · guigameoptionsin-game

Game Options In-game

I'm making a Space Sim, and I need an options menu where you can change different aspects of the game (For example: Difficulty, AI count, sound settings, etc.) There's probably no specific script to do things like that, but if there is, and you don't mind posting it, that would be great, (btw, I'm not asking for you to write any scripts for me). Even better would be if you could lead me to some sort of documentation, so I could learn it myself. Thanks in advance.

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
2
Best Answer

Answer by Joshua · Aug 22, 2011 at 12:46 AM

http://unity3d.com/support/documentation/Components/GUI%20Scripting%20Guide.html

Comment
Add comment · Show 5 · 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 DayyanSisson · Aug 22, 2011 at 04:09 AM 0
Share

Trust me, I've looked at this already. I already know how to do basic GUI, I just want the options to actually affect things in-game. I'm not sure how to approach this.

avatar image Joshua · Aug 22, 2011 at 04:13 AM 0
Share

I'm sorry if my answer was a bit.. unhelpful. But how can you possibly say you understand how to do basic GUI but not how to have it affect things in game?

 function OnGUI()
 {
     if( GUILayout.Button( "Click $$anonymous$$e" ) )
         DoSomething();
 }
avatar image DayyanSisson · Aug 22, 2011 at 05:02 PM 0
Share

Okay, I know $$anonymous$$OST of basic GUI. I know how to load levels, but that's basic what I meant was changing a variable like number of AI (I'm sorry because I keep saying that over and over)

 function OnGUI()
 {
     if( GUILayout.Button( "Click $$anonymous$$e" ) )
         ChangeAICount();
 }

Obviously, ChangeAICount won't do anything, even if I set a variable (It's not a float, int, string, etc...). So I just want to know how to maybe connect scripts. Thanks again.

avatar image DayyanSisson · Aug 23, 2011 at 11:17 PM 0
Share

Never $$anonymous$$d I figured it out. Thanks anyway.

avatar image em2 · Aug 24, 2011 at 12:01 AM 0
Share

Did you use a public variable to pass the value between scripts, or did you pass the value back to the function?

Cheers Chris

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Setting Scroll View Width GUILayout 1 Answer

Pause Menu 5 Answers

ignore left mouse button click in the game when using gui buttons 4 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Hey guys, I want to no how to go inside an object with a collider but to still collide with it? 2 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