1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00
xNode/Examples/Nodes/AddNode.cs
Thor Brigsted b7543df012 Serialized connections
Nodes now also have a reference to their NodeGraph
2017-09-21 10:54:49 +02:00

16 lines
410 B
C#

using UnityEngine;
[System.Serializable]
public class AddNode : Node {
public int someValue;
protected override void Init() {
inputs = new NodePort[2];
inputs[0] = CreateNodeInput("A", typeof(float));
inputs[1] = CreateNodeInput("B", typeof(float));
outputs = new NodePort[1];
outputs[0] = CreateNodeOutput("Result", typeof(float));
}
}