// Use this for initialization void Start() { if (PlayerPrefs.GetInt("StartGlaz") == 1) { mainCanv.SetActive(false); riglaCanv.SetActive(true); } if (PlayerPrefs.GetInt("StartGlaz") == 2) { gatchinaUI.SetActive(true); } mailSender = GetComponent <mono_gmail> (); StartCoroutine(GetMail()); StartCoroutine(GetStartTime()); StartCoroutine(RastGatchina()); }
//Singleton private void Awake() { if (instance == null) { instance = this; globalSettings = new Global(); writer = new file_writer(); writer.writeOnFile("prueba"); sender = new mono_gmail(); } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }