/// <summary> /// 加载更新服务器的地址 /// </summary> private async Task LoadServerURL_Async() { var rResourceRequest = Resources.LoadAsync <TextAsset>("server_url_default"); await rResourceRequest; string rServerContent = (rResourceRequest.asset as TextAsset).text; JsonNode rJsonNode = JsonParser.Parse(rServerContent); this.ServerURL = rJsonNode.ToObject <ABServerURL>(); }
/// <summary> /// 加载更新服务器的地址 /// </summary> private IEnumerator LoadServerURL_Async() { var rResourceRequest = Resources.LoadAsync <TextAsset>("server_url_default"); yield return(rResourceRequest); string rServerContent = (rResourceRequest.asset as TextAsset).text; JsonNode rJsonNode = JsonParser.Parse(rServerContent); this.ServerURL = rJsonNode.ToObject <ABServerURL>(); }