CTT/Unity/Assets/Hotfix/Logic/Behaviour/Game/Helper/GlobalHotfixProtoHelper.cs

26 lines
692 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using ET;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using UnityEngine;
namespace ET
{
public class GlobalHotfixProtoHelper
{
private static string clientVer;
public static async ETTask<string> GetClintVersion()
{
if (clientVer == null)
{
2021-04-11 19:50:39 +08:00
TextAsset config = await ResourceHelper.LoadAssetAsync<TextAsset>(PathHelper.GlobalHotfixConfig);
GlobalHotfixProto globalProto = MongoHelper.FromJson<GlobalHotfixProto>(config.text);
2021-04-08 20:09:59 +08:00
clientVer = globalProto.ClientVersion;
}
return clientVer;
}
}
}