- Home /
Graphical settings
Hello, I added settings option to my game, where you can chose between low, medium, and high graphics. And i faced a problem. My game runs a script at the begining of the game where it gets the current setting from PlayerPrefs and then sets the correct graphics level, however, sometimes the ligthing will stay dark Example:
The darker picture is the bug, it should be always light. It's some lighting related problem.
Here is piece of code where the script will change graphics.
currentSetting = PlayerPrefs.GetString("Graphics");
Application.targetFrameRate = 60;
if (currentSetting == "low")
{
terrain.heightmapPixelError = 200;
terrain.basemapDistance = 1;
QualitySettings.currentLevel = QualityLevel.Fastest;
}
if (currentSetting == "med")
{
terrain.heightmapPixelError = 25;
terrain.basemapDistance = 60;
QualitySettings.currentLevel = QualityLevel.Simple;
}
if (currentSetting == "high")
{
terrain.heightmapPixelError = 10;
terrain.basemapDistance = 100;
lights.shadows = LightShadows.Soft;
QualitySettings.currentLevel = QualityLevel.Fantastic;
}
P.S any ideas of another important settings that can increase performance? The idea is so low settings will be as optimized as possible even if graphics will look crap, but so high settings will look amazing.
Answer by Tepei · May 14, 2015 at 03:09 PM
the fastest quality have no Pixel lightCount by default. Maybe that's why. But it could be interesting to have a quality setting with no runtime light and only a ambient light more strong. Or maybe a baked light ? Also you could make a script that change the shader of the material in the lowest mode to have a cheaper one.
Thanks, i will try this out. Btw i am using mobile defuse shader, it's already the cheapest , no? or is there a more cheap one?
Your answer
![](https://koobas.hobune.stream/wayback/20220613195603im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Lighting and Graphics for low GPU (mobile VR)? 0 Answers
Shadows problem on mobile 0 Answers
Unity 2019.2 lwrp brightness problem 0 Answers
Mobile Graphics Settings in Menu 1 Answer
Shadows are choppy on Android, but look fine in Unity Editor on my PC 0 Answers