- Home /
Editing "settings" in script?
I'm working on a team for a simple game, and some of the designers are complaining that they need "such and such" setting easily available, and are stumbling through the many menus. I was thinking of making a "settings menu" from script so they have exactly what they need, and can play with only the needed settings in a nice and minimalist way.
This is esoteric, but is it even possible to edit things like "render settings", and "project settings" from a script? And more importantly, where should I look for the documentation for something like this?
thanks!
-Frank
Answer by Fornoreason1000 · Jun 22, 2014 at 09:42 AM
You can definitely edit the settings in game and certainly can be done within the GUI... all you do is set these variables within the scripts triggered by your GUI. now be warned... not every setting can be edited...
this is most notable in the quality settings where not all the settings in the editor are available at runtime... such as Texture Quality, Shadow Types and soft particles. this is a rather annoying design flaw in Unity which is a real pain to work around. also not all settings I've listed below will be needed in your Game such as master texture limit which is completely useless to the player and probably will annoy your designers further...
Below are some Scripting Documentation of each of the available settings.
Render Settings: http://docs.unity3d.com/ScriptReference/RenderSettings.html
Audio Settings: http://docs.unity3d.com/ScriptReference/AudioSettings.html
Quality Settings: http://docs.unity3d.com/Manual/class-QualitySettings.html
Player Settings: http://docs.unity3d.com/ScriptReference/PlayerSettings.html
other than the missing settings bug... unity can be made to support custom settings withing the game and should be able to meet your designers requirements. if you need more info on each settings just Google the appropriate setting class. e.g is i wanted to find out about Quality settings i would search "Quality Settings Unity" etc.
Hope it helps.. :)
Think this can help, would more, like "input settings" be available? And this doesn't have to be at runtime.
one of the request made to me, (like I'm, as a programmer, some sort of wizard that can make anything possible), was a simplified way to add input, (I find the current way simple enough, but I'm not the $$anonymous$$m lead, who is a sigh designer).
if not at runtine then when? ($$anonymous$$ain $$anonymous$$enu withing the game build counts as runtime) if your trying to edit the popup you get when you run a build then forget it... that thing is hard coded to oblivion. trust me.
yes but for input it is a little different and depends how the games input is set up...I use a PS3/360 controller for my games so i wrap a class for them then receive the inputs manually
but yes but the way you do it is outside the Input $$anonymous$$anager static class so you will not get documentation for it in scripting. Input Buttons can't be edited one the game starts. (only in the pop up before it)
if you are talking about the build configuration window then i suggest you disable it (yes i'm surprised they let you do that") then make your own settings menu inside the game e.g AT runtime... it makes the seem game a lot neater too.
to disable the config window go to Player settings and change resolution dialog to Disabled. from there you can add your Settings where ever the designer chooses... explain to him that the standard config window is completely uncustomizable and its necessary for you to use an in-game setting menu ins$$anonymous$$d.
ideal places for the settings are...
Pause $$anonymous$$enus.., Item $$anonymous$$enus... Title Screens... Before Title screens