1
This commit is contained in:
@@ -12,20 +12,50 @@ namespace Stary.Evo.Editor
|
||||
public class CreatPointCloudEntity
|
||||
{
|
||||
private CreatPointCloudWindow window;
|
||||
[HideInInspector]
|
||||
public string id;
|
||||
[HorizontalGroup("identifier")] [ReadOnly] public string sceneName;
|
||||
[HorizontalGroup("identifier")][ReadOnly]
|
||||
[HideInInspector] public string id;
|
||||
|
||||
[HorizontalGroup("identifier")] [ReadOnly]
|
||||
public string sceneName;
|
||||
|
||||
[HorizontalGroup("identifier")] [ReadOnly]
|
||||
public string identifier;
|
||||
[ReadOnly]
|
||||
public string sceneDesc;
|
||||
[HorizontalGroup("button")]
|
||||
public bool isActive;
|
||||
|
||||
[ReadOnly] public string sceneDesc;
|
||||
[HorizontalGroup("button")] public bool isActive;
|
||||
|
||||
public CreatPointCloudEntity(CreatPointCloudWindow window)
|
||||
{
|
||||
this.window = window;
|
||||
}
|
||||
|
||||
[HorizontalGroup("button")]
|
||||
[Button("", Icon = SdfIconType.ArrowUpCircleFill, IconAlignment = IconAlignment.RightEdge)]
|
||||
public async void UpdatePointCloud()
|
||||
{
|
||||
string ip = EditorPrefs.GetString("ip");
|
||||
if (string.IsNullOrEmpty(ip))
|
||||
{
|
||||
EditorUtility.DisplayDialog("提示", "ip不能为空", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
var scene = new
|
||||
{
|
||||
id = id,
|
||||
sceneName = sceneName,
|
||||
sceneDesc = sceneDesc,
|
||||
isActive = isActive,
|
||||
};
|
||||
string body = JsonConvert.SerializeObject(scene);
|
||||
ResultMessageEntity entity = await WebRequestSystem.Put($"{ip}/SceneWork/UpdateScene", body);
|
||||
if (entity.code == 200)
|
||||
{
|
||||
|
||||
EditorUtility.DisplayDialog("提示", $"更新成功{scene}", "确定");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HorizontalGroup("button")]
|
||||
[Button("", Icon = SdfIconType.XCircle, IconAlignment = IconAlignment.RightEdge)]
|
||||
public async void DeletePointCloud()
|
||||
@@ -36,13 +66,13 @@ namespace Stary.Evo.Editor
|
||||
EditorUtility.DisplayDialog("提示", "ip不能为空", "确定");
|
||||
return;
|
||||
}
|
||||
ResultMessageEntity entity = await WebRequestSystem.Delete(ip,$"/SceneWork/DeleteScenebyId/{id}");
|
||||
if (entity.code ==200)
|
||||
|
||||
ResultMessageEntity entity = await WebRequestSystem.Delete(ip, $"/SceneWork/DeleteScenebyId/{id}");
|
||||
if (entity.code == 200)
|
||||
{
|
||||
window.SceneWorkEntities.Remove(this);
|
||||
EditorUtility.DisplayDialog("提示", "删除成功", "确定");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user