【m】优化加载架构

This commit is contained in:
zhangzheng
2026-01-05 17:58:53 +08:00
parent 033edf402f
commit af80facb43
28 changed files with 333 additions and 248 deletions

View File

@@ -18,7 +18,7 @@ namespace Stary.Evo
/// </summary>
public string loadDomain;
private void Awake()
private async void Awake()
{
if (Global == null)
{
@@ -39,6 +39,22 @@ namespace Stary.Evo
_devLoadSystem.AddState(new HotFixState(_devLoadSystem));
_devLoadSystem.AddState(new LoadResState(_devLoadSystem));
//_fsmSystem.AddState(new LoadResMainState(_fsmSystem));
//初始化读取资源配置表
HotfixMainResDomain hotfixMainResDomain = Resources.Load<HotfixMainResDomain>("HotfixMainResDomain");
if (hotfixMainResDomain != null)
{
AppConfig.IpConfig = hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig;
AppConfig.UserName = hotfixMainResDomain.hotfixMainResDomainEntity.username;
AppConfig.PassWord = hotfixMainResDomain.hotfixMainResDomainEntity.password;
AppConfig.ProductName = Application.identifier;
AppConfig.MainDomainVersion = hotfixMainResDomain.hotfixMainResDomainEntity.mainDomainVersion;
}
Debug.Log($"UnityEvo:读取资源配置表成功...{AppConfig.IpConfig}{AppConfig.UserName}{AppConfig.PassWord}");
//登录
string url = AppConfig.IpConfig + "/Authentication/login";
_devLoadSystem.IsLogin = await WebRequestSystem.Login(url, AppConfig.UserName, AppConfig.PassWord);
}
private void Start()