This commit is contained in:
CortexCore
2023-07-02 02:20:40 +08:00
parent dfbcd03756
commit 6df4649c64
13 changed files with 194 additions and 70 deletions

View File

@@ -4,7 +4,8 @@
"references": [
"GUID:a209c53514018594f9f482516f2a6781",
"GUID:508392158bd966c4d9c21e19661a441d",
"GUID:f51ebe6a0ceec4240a699833d6309b23"
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:14fe60d984bf9f84eac55c6ea033a8f4"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@@ -1,47 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.UIElements;
using UnityEditor.UIElements;
namespace BITKit.Sensors.Editors
{
/* [CustomEditor(typeof(Sensor), true)]
public class SensorInspecer : Editor
{
public override VisualElement CreateInspectorGUI()
{
VisualElement container = new();
InspectorElement.FillDefaultInspector(container, serializedObject, this);
var sensor = serializedObject.targetObject as Sensor;
VisualElement listElement = new();
Refresh();
Button button = new(() =>
{
sensor.Excute();
Refresh();
});
button.text = "Test";
container.Add(listElement);
container.Add(button);
return container;
void Refresh()
{
listElement.Clear();
listElement.Add(new Label("Detected:"));
sensor.detecteds.ForEach(x =>
{
var objectFiled = new ObjectField();
objectFiled.objectType = typeof(Transform);
objectFiled.value = x;
listElement.Add(objectFiled);
}
);
}
}
} */
}