My game doesnt run well with android 4. I would like some kind of waring popup if the game detects that the device runs on android 4 or older. How do I do that?
The following SystemInfo function will return what you are looking for
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
void Example() {
print(SystemInfo.operatingSystem);
}
}
SystemInfo is a class that will give you access to this information (via the operatingSystem variable). Or someone on a thread over at GameDev Stack Exchange has put up a small bit of C# that should return you the exact API level which you can then use to determine what android version is being run.
Hope this helps.