This commit is contained in:
2025-09-23 18:28:06 +08:00
parent 987e89b3fc
commit 4486e7dd82
11 changed files with 273 additions and 325 deletions

View File

@@ -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("提示", "删除成功", "确定");
}
}
}
}