Files
com.misaki.graph-view/Sample/Runtime/Models/Nodes/Add.cs
Misaki d3c5968a80 Changed Slot in RelayNode to ProxySlot;
Changed PullData and PushData from SlotExtension to ISlot;

Added BackTraceExecutableNode;

Removed IExecutable from RelayNode;
2024-11-10 12:28:12 +09:00

32 lines
542 B
C#

#if UNITY_EDITOR
using Misaki.GraphView.Editor;
#endif
namespace Misaki.GraphView.Sample
{
[NodeInfo("Add", "Math")]
public class Add : BackTraceExecutableNode
{
[NodeInput]
#if UNITY_EDITOR
[InspectorInput]
#endif
public float a;
[NodeInput]
#if UNITY_EDITOR
[InspectorInput]
#endif
public float b;
[NodeOutput]
private float _result;
protected override bool OnExecute()
{
_result = a + b;
return true;
}
}
}