Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

SystemInfo.operatingSystem doesn't match docs.

Discussion in 'Documentation' started by JohnnyFactor, Mar 14, 2019.

  1. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    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:
    343
    I found a way around this:

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