1
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class CreatPointCloudEntity
|
||||
{
|
||||
private CreatPointCloudWindow window;
|
||||
[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;
|
||||
|
||||
public CreatPointCloudEntity(CreatPointCloudWindow window)
|
||||
{
|
||||
this.window = window;
|
||||
}
|
||||
[HorizontalGroup("button")]
|
||||
[Button("", Icon = SdfIconType.XCircle, IconAlignment = IconAlignment.RightEdge)]
|
||||
public async void DeletePointCloud()
|
||||
{
|
||||
string ip = EditorPrefs.GetString("ip");
|
||||
if (string.IsNullOrEmpty(ip))
|
||||
{
|
||||
EditorUtility.DisplayDialog("提示", "ip不能为空", "确定");
|
||||
return;
|
||||
}
|
||||
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