Quantcast
Viewing all articles
Browse latest Browse all 2383

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][1]. Give any solutions please. Thanks [1]: /storage/temp/39379-nexus-5-crash.txt

Viewing all articles
Browse latest Browse all 2383

Trending Articles