Unity graph tool solution based on different implementation now focused on Unity.Experimental.Graphview
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
706 B

using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;
namespace TNode.Editor.Inspector.InspectorImplementation{
public class PropertyFieldItem:InspectorItem<Object>{
public PropertyFieldItem(){
OnDataChanged += () => {
var data = new SerializedObject(Value as Object);
var testProperty = data.GetIterator().GetArrayElementAtIndex(0);
PropertyField propertyField = new PropertyField(testProperty);
this.Q<PropertyField>()?.RemoveFromHierarchy();
this.Add(propertyField);
};
}
}
}