- Home /
The question is answered, right answer was accepted
Unity 4.6 Android changing quality level during runtime
Hi!So I am using the new version of Unity and i am changing the quality level like this: I made some buttons then added this script for example:
QualitySettings.SetQualityLevel(0,true);
Now this sometimes causes the game to go into a permanent black screen until the application is forced to shut down or nothing happends until i restart(which is what i actualy want).Why does this happend and how can i get rid of the black screen?Am i doing something wrong?Please help. Thank you
Are you using Lollipop on the Android device? I've seen this sort of behavior from a couple games on an Android 5.0 Nexus 7, but I'd never seen it happen under Android 4.x.
Answer by psycocrusher · Nov 29, 2014 at 08:35 PM
I don't suggest putting QualitySettings.SetQualityLevel on a button, it was messing up my project last time i checked.
I am using something like this on start up, it's in C#:
void AutoQualitySettings (){
int Memory = SystemInfo.systemMemorySize;
int Cpus = SystemInfo.processorCount;
if(Cpus == 1){
if(Memory < 700){
//Low Res
QualitySettings.SetQualityLevel (2, true);
}
if(Memory > 700){
//Med Res
QualitySettings.SetQualityLevel (1, true);
}
}
if(Cpus >= 2){
if(Memory < 700){
//Med Res
QualitySettings.SetQualityLevel (1, true);
}
if(Memory > 700){
//High Res
QualitySettings.SetQualityLevel (0, true);
}
}
}
hmm good sugestion...if i dont find a better sollution i will use this.Thank you
Follow this Question
Related Questions
Bumpy shadow edges in both the Unity editor, and on Android 0 Answers
android terrain textures problem 2 Answers
Android Game not working 2 Answers
Character Controller with Unity User Iterface input 1 Answer
Android Videos quality setting 0 Answers