111
This commit is contained in:
@@ -19,20 +19,24 @@ namespace Stary.Evo.Editor
|
||||
[HorizontalGroup] [ReadOnly] public string DomainName;
|
||||
|
||||
private bool IsValidPath => IsValidProjectPath(domainPath);
|
||||
private bool IsValidIP => string.IsNullOrEmpty(ip);
|
||||
|
||||
[ReadOnly] [InfoBox("当前路径在Unity项目中不存在,请检查路径是否需要删除", InfoMessageType.Error, "IsValidPath")]
|
||||
[ReadOnly]
|
||||
[InfoBox("当前用户在Unity项目中不存在,请检查该用户是否需要删除", InfoMessageType.Warning, "IsValidPath")]
|
||||
[InfoBox("当前用户在服务器上不存在,暂不支持数据管理,仅支持数据配置", InfoMessageType.Warning, "IsValidIP")]
|
||||
public string domainPath;
|
||||
|
||||
private ResDmainResponse resDmainResponse;
|
||||
|
||||
|
||||
[InlineEditor(InlineEditorObjectFieldModes.CompletelyHidden)]
|
||||
[HideLabel]
|
||||
[InlineEditor(InlineEditorObjectFieldModes.CompletelyHidden)] [HideLabel]
|
||||
public ArtSceneData artSceneData;
|
||||
|
||||
public CreatMemberServerDomainEntity(List<CreatMemberServerDomainEntity> domainList)
|
||||
{
|
||||
this.domainList = domainList;
|
||||
}
|
||||
|
||||
public void SetDomainData(string domainName, string domainPath, ResDmainResponse response, string ip)
|
||||
{
|
||||
resDmainResponse = response;
|
||||
@@ -49,8 +53,14 @@ namespace Stary.Evo.Editor
|
||||
_endableBtnName = "禁用";
|
||||
_endableBtnColor = Color.red;
|
||||
}
|
||||
|
||||
SetArtSceneData();
|
||||
}
|
||||
|
||||
public void SetArtSceneData()
|
||||
{
|
||||
string artSceneDataPath =
|
||||
$"Assets/Member/{domainName}/Config/ArtSceneData.asset";
|
||||
$"Assets/Member/{DomainName}/Config/ArtSceneData.asset";
|
||||
ArtSceneData artSceneData =
|
||||
AssetDatabase.LoadAssetAtPath<ArtSceneData>(artSceneDataPath);
|
||||
if (artSceneData != null)
|
||||
@@ -59,11 +69,13 @@ namespace Stary.Evo.Editor
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"UnityEvo:ArtSceneData 不存在,请检查路径{artSceneDataPath}");
|
||||
//Debug.LogError($"UnityEvo:ArtSceneData 不存在,请检查路径{artSceneDataPath}");
|
||||
}
|
||||
}
|
||||
|
||||
[HorizontalGroup(Width = 60)]
|
||||
[Button("", Icon = SdfIconType.ArrowRepeat, IconAlignment = IconAlignment.RightEdge)]
|
||||
[Button("", Icon = SdfIconType.ArrowDownCircle, IconAlignment = IconAlignment.RightEdge)]
|
||||
[HideIf("@ IsValidIP")]
|
||||
public void CreatDomain()
|
||||
{
|
||||
if (DomainName == "Main")
|
||||
@@ -79,12 +91,14 @@ namespace Stary.Evo.Editor
|
||||
if (window != null)
|
||||
{
|
||||
window.CreateDomainDirectory(DomainName);
|
||||
SetArtSceneData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HorizontalGroup(Width = 60)]
|
||||
[Button("", Icon = SdfIconType.XCircle, IconAlignment = IconAlignment.RightEdge)]
|
||||
[HideIf("@ IsValidIP")]
|
||||
public async void CloseDomain()
|
||||
{
|
||||
if (DomainName == "Main")
|
||||
@@ -129,6 +143,7 @@ namespace Stary.Evo.Editor
|
||||
[Button("@ _endableBtnName", IconAlignment = IconAlignment.RightEdge)]
|
||||
[GUIColor("@ _endableBtnColor")]
|
||||
[DisableIf("@ IsReadOnly")]
|
||||
[HideIf("@ IsValidIP")]
|
||||
public async void IsEndable()
|
||||
{
|
||||
if (DomainName == "Main")
|
||||
@@ -149,6 +164,7 @@ namespace Stary.Evo.Editor
|
||||
_endableBtnName = "禁用";
|
||||
_endableBtnColor = Color.red;
|
||||
}
|
||||
|
||||
string url = $"{ip}/ResDomain/UpdateResDomain";
|
||||
var requst = new ResDmainUpdateRequst()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user