- Home /
Question by
airomagic · Jan 23, 2015 at 03:26 PM ·
crashqualityqualitysettings
QualitySettings.SetQualityLevel android crash
Hi,
Does not work correctly QualitySettings.SetQualityLevel. After that, the game crashes, even the device may restart. I set quality = 3 (Good).
On my ASUS Zenfone 5 (1280x720) everything works fine, but on the Nexus (FullHD) 5 and 7 crash.
Code:
void Awake()
{
float width = Screen.height > Screen.width ? Screen.height : Screen.width;
float screenScale = width / 1920;
int qualityLevel = 0;
if (screenScale >= 0.5f) qualityLevel = 3;
else if (screenScale >= 0.25f) qualityLevel = 2;
else if (screenScale >= 0.125f) qualityLevel = 1;
else qualityLevel = 0;
QualitySettings.SetQualityLevel(qualityLevel, true);
}
See the log from the Nexus 5.
Give any solutions please. Thanks
nexus-5-crash.txt
(51.5 kB)
Comment
Higher Resolution = $$anonymous$$ore processing required.
What does logcat say?
Your answer