IEnumerator LoadInitData() { _txtState.text = "Loading game init data..."; if (!PlayerPrefs.HasKey(Constant.AllINIT)) { yield return(StartCoroutine(ServerAdapter.LoadInitData(result => { if (result.StartsWith("Error")) { Debug.LogError("Load Init data failed!"); } else { PlayerPrefs.SetString(Constant.AllINIT, result); SplitDataFromServe.ReadInitData(result); } }))); } else { SplitDataFromServe.ReadInitData((PlayerPrefs.GetString(Constant.AllINIT))); } yield return(null); }