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
0
Question by Dogg · Jul 27, 2014 at 04:20 AM · c#guibutton

C# Why Won't My GUI Layout Button Appear?

A quick question and problem I'm having here. I want to know why won't my GUI Layout button appear on the Window Rect like the others before it. To understand what I'm saying, you'll need my script: http://pastebin.com/vYkTyEcP

Since it's a little long I recommend trying it out in Unity. Anyways when I click the "Options" GUI Layout button, it takes me to a new Window Rect called "Options Menu". In the Options Menu it has another GUI Layout Button called "Audio Settings", and when I click that, it takes me to another new rect called "Audio", however when I try to get another GUI layout button called "Settings" to appear in the Audio rect, it doesn't. How can this be? It works for the Audio Settings but not for this?

By the way I created this script myself by randomly messing around with it, hence why it is so inefficient, because again this came from the top of my head. I made most of the script in about an hour or so, and have been trying to figure out the problem I'm having now since morning(it is now night for me). So please help if you want to.

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

Answer by rutter · Jul 27, 2014 at 11:09 PM

Looks like a simple logic error: when you go to the sound menu, you set optionsmenu to false... but because of the way your blocks are nested, you only check soundsettings if optionsmenu is still true.

You probably intend for soundsettings to be checked, regardless, so you can just move it out of that block.

Short answer: the } closing brace on line 115 needs to move up to line 107.

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 Dogg · Jul 27, 2014 at 11:25 PM 0
Share

I was wondering what was the problem. Thanks a bunch! I pretty much confused myself with all my code, because I was typing randomly not caring about how it looks. Thanks again.

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

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

Related Questions

Multiple Cars not working 1 Answer

Not working gui buttons 1 Answer

c# Quit button wont quit game 1 Answer

Is There A Way To Make Sprites Clickable? 1 Answer

Cases if a GUI.Button is clicked two or more times?? 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