mirror of
https://github.com/Siccity/xNode.git
synced 2026-02-04 22:34:54 +08:00
Working on INode, INodeGraph
This commit is contained in:
parent
1be9cb0217
commit
f03dbeb159
@ -15,8 +15,8 @@ namespace XNode {
|
||||
IEnumerable<NodePort> Outputs { get; }
|
||||
IEnumerable<NodePort> Inputs { get; }
|
||||
IEnumerable<NodePort> 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);
|
||||
|
||||
@ -105,7 +105,7 @@ namespace XNode {
|
||||
/// <summary> Iterate over all dynamic inputs on this node. </summary>
|
||||
public IEnumerable<NodePort> DynamicInputs { get { foreach (NodePort port in Ports) { if (port.IsDynamic && port.IsInput) yield return port; } } }
|
||||
/// <summary> Parent <see cref="NodeGraph"/> </summary>
|
||||
public NodeGraph Graph { get { return graph; } }
|
||||
public INodeGraph Graph { get { return graph; } }
|
||||
/// <summary> Parent <see cref="NodeGraph"/> </summary>
|
||||
[SerializeField] private NodeGraph graph;
|
||||
/// <summary> Position on the <see cref="NodeGraph"/> </summary>
|
||||
|
||||
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace XNode {
|
||||
/// <summary> Base class for all node graphs </summary>
|
||||
[Serializable]
|
||||
public abstract class NodeGraph : ScriptableObject {
|
||||
public abstract class NodeGraph : ScriptableObject, INodeGraph {
|
||||
|
||||
/// <summary> All nodes in the graph. <para/>
|
||||
/// See: <see cref="AddNode{T}"/> </summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user