//---------- #region Mono Behaviour void Awake() { #if UNITY_EDITOR if (resetPlayerPrefAtBegining) { StartCoroutine(ResetingPlayerPrefs()); } #elif UNITY_ANDROID if (resetPlayerPrefAtBegining) { if (PlayerPrefs.GetInt(HAS_RESET_PLAYERPREF + Application.version, 0) == 0) { StartCoroutine(ResetingPlayerPrefs()); } } #endif Application.targetFrameRate = targetedFramePerSec; QualitySettings.vSyncCount = 0; if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } PreProcess(); }
/// <summary> /// This function is called when the object becomes enabled and active. /// </summary> void OnEnable() { Reference = (DeviceInfoManager)target; if (DeviceInfoManager.Instance == null) { DeviceInfoManager.Instance = Reference; } }