Changed Slot in RelayNode to ProxySlot;

Changed PullData and PushData from SlotExtension to ISlot;

Added BackTraceExecutableNode;

Removed IExecutable from RelayNode;
This commit is contained in:
Misaki
2024-11-10 12:28:12 +09:00
parent 994297a3f2
commit d3c5968a80
21 changed files with 398 additions and 281 deletions

View File

@@ -5,7 +5,7 @@ using Misaki.GraphView.Editor;
namespace Misaki.GraphView.Sample
{
[NodeInfo("Add", "Math")]
public class Add : ExecutableNode
public class Add : BackTraceExecutableNode
{
[NodeInput]
#if UNITY_EDITOR

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b5cf6534e577abb45a6f0a178aba73eb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
namespace Misaki.GraphView.Sample
{
public abstract class BackTraceExecutableNode : ExecutableNode
{
protected override void OnPullData(ISlot input)
{
if (input.LinkedSlotDatas.Count == 0)
{
return;
}
var outputNode = GraphObject.GetNode(input.LinkedSlotDatas[0].nodeID);
if (outputNode is IExecutable executable)
{
executable.Execute();
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 45807fa2f84655b4783b18aee34a21c9

View File

@@ -1,7 +1,7 @@
namespace Misaki.GraphView.Sample
{
[NodeInfo("Output Node", "Output")]
public class Output : ExecutableNode
public class Output : BackTraceExecutableNode
{
[NodeInput]
private float _input;