// Use this for initialization private void Start() { //Get Device API Level if (apiLevelText != null) { XDebug.Log(SystemInfo.operatingSystem); #if !UNITY_EDITOR && UNITY_ANDROID int apiLevel = AndroidPlugin.GetAPILevel(); apiLevelText.text = "Device API Level = " + apiLevel; XDebug.Log("Device API Level = " + apiLevel); #endif } //Get system language if (languageText != null) { SystemLanguage lang = Application.systemLanguage; var strVal = Enum.GetName(typeof(SystemLanguage), lang); languageText.text = "System Language = " + (int)lang + " (" + strVal + ")"; } if (hardVolToggle != null) { hardVolToggle.isOn = FindObjectOfType <HardVolumeController>().HardOperation; OnHardVolumeOperationChanged(hardVolToggle.isOn); } if (vibratorControl != null) { XDebug.Log("IsSupportedVibrator = " + vibratorControl.IsSupportedVibrator); } }
int apiLevel = 0; //0: (not set) // Use this for initialization private void Start() { #if !UNITY_EDITOR && UNITY_ANDROID apiLevel = AndroidPlugin.GetAPILevel(); #endif }