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 jeThomas · Oct 25, 2014 at 05:11 PM · c#guisaveloadcontinuous

[Solved] Built in GUI continuously Loads through different Options.

Is there any way that I can break a Loop just in the GUI code? It just continuously loads from my GameControl script as to where I cannot change any options, as I change some of these options, it quickly reverts back to the saved method which I believe quickly reloads continuously.

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 gjf · Oct 25, 2014 at 02:30 PM 0
Share

try showing your code...

avatar image jeThomas · Oct 25, 2014 at 02:41 PM 0
Share

I have switch case for my buttons:

 void OnGUI() {
     switch(menuSelection) {
         case 0:
             windowRect=GUI.Window(0, windowRect, SPOptionsWindow, "Singleplayer Options");
             //This is where I would like to have the different load options for different settings from $$anonymous$$ultiplayer.
             GameControl.control.LoadSP();
         break;
         case 1:
             $$anonymous$$POptionsButton();
             //This is where I would like to have the different load options for different settings from Singleplayer.
             GameControl.control.Load$$anonymous$$P();
         break;
         default:
             //Not sure what goes here/Error Handling?
         break;
     }
 }


Now it loads up the different settings just fine, however I can't get it to allow me to change these settings once they've loaded.

avatar image gjf · Oct 25, 2014 at 03:05 PM 0
Share

what do $$anonymous$$POptionsButton(), LoadSP() & Load$$anonymous$$P() do? when you say it won't allow you to change the settings, what are you trying? there's not enough info in the question/code to explain it

avatar image jeThomas · Oct 25, 2014 at 03:22 PM 0
Share

I didn't add it because they are just methods that are called. The problem that I'm having is in the Switch/Case or it's because of the built in GUI. Perhaps we can do a screenshare?

Then maybe you can better understand.

1 Reply

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

Answer by jeThomas · Oct 26, 2014 at 08:02 AM

Basically (Even though I had switched to the New UI) this is still required. I had to create two GameControl objects, one simply called spGameControl, and the other mpGameControl. While keeping both in play and if it loads the Singleplayer Game; then it just simply uses the spGameControl while the mpGameControl is just sitting in the air of the scene. Just existing. I'm sure there is a way to destroy certain game control objects once the scene is loaded, I just don't know how to do all of that yet lol. But I hope this helps anyone looking for the answer.

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

2 People are following this question.

avatar image avatar image

Related Questions

Save and load serialization problem 0 Answers

Multiple Cars not working 1 Answer

My save function saves the wrong values!! 1 Answer

create text file in C#. 2 Answers

How to use StreamReader in my case 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