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.

27 lines
658 B

3 years ago
using Dialogue;
using UnityEditor.Experimental.GraphView;
namespace TNode.BaseViews{
//A Node monitor some type of node in the graph
public abstract class NodeView<T> : Node where T:NodeData,new(){
protected T _data;
public T Data{
get => _data;
set{
_data = value;
OnDataChanged?.Invoke(value);
}
}
public sealed override string title{
get => base.title;
set => base.title = value;
}
public event System.Action<T> OnDataChanged;
public NodeView(){
}
}
}