30 lines
768 B
C#
30 lines
768 B
C#
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)
|
|
{
|
|
#if UNITY
|
|
string config = (await ResourceHelper.LoadAssetAsync<TextAsset>(PathHelper.GlobalHotfixConfig)).text;
|
|
#else
|
|
string config = null;
|
|
#endif
|
|
GlobalHotfixProto globalProto = MongoHelper.FromJson<GlobalHotfixProto>(config);
|
|
clientVer = globalProto.ClientVersion;
|
|
}
|
|
return clientVer;
|
|
}
|
|
}
|
|
}
|