35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using AlicizaX;
|
|
using AlicizaX.Resource.Runtime;
|
|
using Cysharp.Threading.Tasks;
|
|
using Newtonsoft.Json.Linq;
|
|
using UnityEngine;
|
|
using YooAsset;
|
|
|
|
public static class StartupSetting
|
|
{
|
|
public const string EntranceDll = "GameLogic.dll";
|
|
public const string EntranceClass = "GameLogic.HotfixEntry";
|
|
public const string EntranceMethod = "Entrance";
|
|
|
|
public static readonly List<string> HotUpdateAssemblies = new List<string>()
|
|
{ "GameLib.dll", "GameProto.dll", "GameBase.dll", "GameLogic.dll" };
|
|
|
|
|
|
|
|
public const string VersionApi = "http://localhost:5000/api/Version?channel=Standlone";
|
|
public static string Version = string.Empty;
|
|
public static string CDNUrl = string.Empty;
|
|
public static string AppDownloadUrl = string.Empty;
|
|
|
|
public static async UniTask GetRemoteVersion()
|
|
{
|
|
var updateDataStr = await Utility.Http.Get(VersionApi);
|
|
JObject json = JObject.Parse(updateDataStr);
|
|
Version = json["version"].ToString();
|
|
CDNUrl = json["cdnUrl"].ToString();
|
|
AppDownloadUrl = json["appDownloadUrl"].ToString();
|
|
Debug.Log(updateDataStr);
|
|
}
|
|
}
|