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 DricoJD · Jun 08, 2013 at 04:40 PM · menuqualitysettingsoptions

Quality-Settings Selections in scripting

Hello Guys and Gurls.

I have been working all day on my menu at the start of the game (MainMenu). I have seem to run in a problem however. It is not that I do not have the knowledge to code it myself or time. It is that I do not have the sweetest clue on how to do it without using a different script for all of the inputs.

Anyway, I have got an options GUI set out, not the kind of GUI SCRIPTING, but the 3D text and then click scripting. Now when I click options all is fine, it opens a menu that has all the quality settings on there, the colour rollover works aswell. ALL IS WORKING!

However, my problem occurs now. How do I get it so that when I click an 3DText like "Options_Fantastic" It actually changes it?

Please help, all answers that are reliable get thumbs-up.

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

Answer by Coderdood · Jun 08, 2013 at 05:46 PM

The Quality Settings class is the one you want. In particular there is the SetQualityLevel method. The SetQualityLevel page has a good example of how it is used.

Note that as stated in the documentation:

When building a player quality levels that are not used for that platform are stripped. You should not expect a given quality setting to be at a given index. It's best to query the available quality settings and use the returned index.

So you will need to use QualitySettings.Names first to get the available settings and then use SetQualityLevel to set it to the desired setting. This is documented on the page linked but I had reread it myself to understand so I thought it would be better to point it out.

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 DricoJD · Jun 09, 2013 at 10:47 AM 0
Share

Thanks, just to point out. WILL I need to use QualitySettings.Names if I know the available settinga already?

avatar image Coderdood · Jun 09, 2013 at 05:33 PM 1
Share

Its probably a good idea - that way you know for sure that your code will work 100% of the time even if platform or your build changes. Also the documentation states:

"You should not expect a given quality setting to be at a given index"

So I would not expect there to be any 100% reliable way of deter$$anonymous$$ing the value to pass to SetQualityLevel without using Names.

avatar image DricoJD · Jun 09, 2013 at 05:35 PM 0
Share

Okay :) Thanks for your help :)

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

15 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

Related Questions

Multiple Cars not working 1 Answer

How to get back to the main menu when dead? 1 Answer

Main Menu Problem 0 Answers

How could I have a ball chooser menu? 1 Answer

pause menu on android phone 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