【m】优化加载架构
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user