diff --git a/Scripts/Interfaces/INode.cs b/Scripts/Interfaces/INode.cs index bfbe1e5..82dc762 100644 --- a/Scripts/Interfaces/INode.cs +++ b/Scripts/Interfaces/INode.cs @@ -15,8 +15,8 @@ namespace XNode { IEnumerable Outputs { get; } IEnumerable Inputs { get; } IEnumerable InstancePorts { get; } - NodePort AddInstanceOutput(Type type, XNode.Node.ConnectionType connectionType = XNode.Node.ConnectionType.Multiple, string fieldName = null); - NodePort AddInstanceInput(Type type, XNode.Node.ConnectionType connectionType = XNode.Node.ConnectionType.Multiple, string fieldName = null); + NodePort AddDynamicOutput(Type type, XNode.Node.ConnectionType connectionType = XNode.Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = Node.TypeConstraint.None, string fieldName = null); + NodePort AddDynamicInput(Type type, XNode.Node.ConnectionType connectionType = XNode.Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint = Node.TypeConstraint.None, string fieldName = null); NodePort GetInputPort(string fieldName); NodePort GetOutputPort(string fieldName); void OnCreateConnection(NodePort from, NodePort to); diff --git a/Scripts/Node.cs b/Scripts/Node.cs index 7ba963a..c9fb68b 100644 --- a/Scripts/Node.cs +++ b/Scripts/Node.cs @@ -105,7 +105,7 @@ namespace XNode { /// Iterate over all dynamic inputs on this node. public IEnumerable DynamicInputs { get { foreach (NodePort port in Ports) { if (port.IsDynamic && port.IsInput) yield return port; } } } /// Parent - public NodeGraph Graph { get { return graph; } } + public INodeGraph Graph { get { return graph; } } /// Parent [SerializeField] private NodeGraph graph; /// Position on the diff --git a/Scripts/NodeGraph.cs b/Scripts/NodeGraph.cs index 6a0cead..a310727 100644 --- a/Scripts/NodeGraph.cs +++ b/Scripts/NodeGraph.cs @@ -5,7 +5,7 @@ using UnityEngine; namespace XNode { /// Base class for all node graphs [Serializable] - public abstract class NodeGraph : ScriptableObject { + public abstract class NodeGraph : ScriptableObject, INodeGraph { /// All nodes in the graph. /// See: