Search Unity

SystemInfo.operatingSystem doesn't match docs.

Discussion in 'Documentation' started by JohnnyFactor, Mar 14, 2019 at 12:24 AM.

  1. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    78
    From the docs:
    "// Prints "Android OS API-22" on Android 5.1"

    What it actually returns:
    "Android OS 5.1.1 / API-22 (LMY47X/G870AU CS2CPB3)"

    I'm trying to set quality level based on OS version.
     
  2. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    78
    I found a way around this:

    Code (CSharp):
    1. if (SystemInfo.operatingSystem.Contains("API-22"))
    2. {
    3.     QualitySettings.SetQualityLevel(0);
    4. }