diff --git a/Scripts/NodeGraph.cs b/Scripts/NodeGraph.cs
index 6b95fc2..38d0364 100644
--- a/Scripts/NodeGraph.cs
+++ b/Scripts/NodeGraph.cs
@@ -11,7 +11,7 @@ namespace XNode {
/// See:
[SerializeField] public List nodes = new List();
- /// Add a node to the graph by type
+ /// Add a node to the graph by type (convenience method - will call the System.Type version)
public T AddNode() where T : Node {
return AddNode(typeof(T)) as T;
}
@@ -37,14 +37,14 @@ namespace XNode {
/// Safely remove a node and all its connections
/// The node to remove
- public void RemoveNode(Node node) {
+ public virtual void RemoveNode(Node node) {
node.ClearConnections();
nodes.Remove(node);
if (Application.isPlaying) Destroy(node);
}
/// Remove all nodes and connections from the graph
- public void Clear() {
+ public virtual void Clear() {
if (Application.isPlaying) {
for (int i = 0; i < nodes.Count; i++) {
Destroy(nodes[i]);
@@ -54,7 +54,7 @@ namespace XNode {
}
/// Create a new deep copy of this graph
- public XNode.NodeGraph Copy() {
+ public virtual XNode.NodeGraph Copy() {
// Instantiate a new nodegraph instance
NodeGraph graph = Instantiate(this);
// Instantiate all nodes inside the graph