1
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Stary.Evo.Editor
|
||||
public class BuildAssetWindow : OdinEditorWindow
|
||||
{
|
||||
public static OdinEditorWindow window;
|
||||
|
||||
private HotfixMainResDomain hotfixMainResDomain;
|
||||
|
||||
[MenuItem("Evo/资源打包工具")]
|
||||
static void ShowWindows()
|
||||
@@ -62,7 +62,20 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
base.Initialize();
|
||||
GetBuildPackageNames();
|
||||
UpdateMessage(false);
|
||||
//初始化读取资源配置表
|
||||
hotfixMainResDomain = Resources.Load<HotfixMainResDomain>("HotfixMainResDomain");
|
||||
if (hotfixMainResDomain == null)
|
||||
{
|
||||
Debug.LogError($"UnityEvo:读取资源配置表失败【HotfixMainResDomain】...表在Resources下不存在,请创建");
|
||||
}
|
||||
else
|
||||
{
|
||||
ip = hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig;
|
||||
EditorPrefs.SetString("ip",ip);
|
||||
userName = hotfixMainResDomain.hotfixMainResDomainEntity.username;
|
||||
password = hotfixMainResDomain.hotfixMainResDomainEntity.password;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(ip))
|
||||
{
|
||||
buildAssetType = BuildAssetType.Login;
|
||||
@@ -90,7 +103,9 @@ namespace Stary.Evo.Editor
|
||||
|
||||
#region BuildAssetLogin
|
||||
|
||||
[ShowIf("@ buildAssetType== BuildAssetType.Login")] [BoxGroup("Login", showLabel: false)]
|
||||
[ShowIf("@ buildAssetType== BuildAssetType.Login")]
|
||||
[BoxGroup("Login", showLabel: false)]
|
||||
[OnValueChanged("SetWebRequestInfo")]
|
||||
public string ip, userName, password;
|
||||
|
||||
[ShowIf("@ buildAssetType== BuildAssetType.Login")]
|
||||
@@ -114,24 +129,24 @@ namespace Stary.Evo.Editor
|
||||
UpdateMessage(islogin);
|
||||
}
|
||||
|
||||
private void SetWebRequestInfo()
|
||||
{
|
||||
if (hotfixMainResDomain != null)
|
||||
{
|
||||
hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig = ip;
|
||||
hotfixMainResDomain.hotfixMainResDomainEntity.username = userName;
|
||||
hotfixMainResDomain.hotfixMainResDomainEntity.password = password;
|
||||
EditorPrefs.SetString("ip",ip);
|
||||
EditorUtility.SetDirty(hotfixMainResDomain);
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
}
|
||||
|
||||
private string message;
|
||||
|
||||
public async void UpdateMessage(bool islogin)
|
||||
public void UpdateMessage(bool islogin)
|
||||
{
|
||||
message = "当前登录状态为:" + islogin;
|
||||
//初始化读取资源配置表
|
||||
HotfixMainResDomain hotfixMainResDomain = Resources.Load<HotfixMainResDomain>("HotfixMainResDomain");
|
||||
if (hotfixMainResDomain == null)
|
||||
{
|
||||
Debug.LogError($"UnityEvo:读取资源配置表失败【HotfixMainResDomain】...表不存在");
|
||||
}
|
||||
else
|
||||
{
|
||||
ip = hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig;
|
||||
userName = hotfixMainResDomain.hotfixMainResDomainEntity.username;
|
||||
password = hotfixMainResDomain.hotfixMainResDomainEntity.password;
|
||||
}
|
||||
|
||||
if (islogin)
|
||||
{
|
||||
buildAssetType = BuildAssetType.Build;
|
||||
|
||||
Reference in New Issue
Block a user