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.

25 lines
720 B

using System;
using TNode.Cache;
using TNode.Editor.Inspector.InspectorImplementation;
using Unity.VisualScripting;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
namespace TNode.Editor.Inspector{
public class InspectorItemFactory{
public InspectorItem<T> Create<T>(){
//Check type of GraphDataType
var hasSpecificType = NodeEditorExtensions.HasSpecificType<InspectorItem<T>>();
Debug.Log(typeof(InspectorItem<T>));
Debug.Log(hasSpecificType);
if (hasSpecificType){
return NodeEditorExtensions.CreateInstance<InspectorItem<T>>();
}
return null;
}
}
}