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:
@@ -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
|
||||
|
||||
8
Sample/Runtime/Models/Nodes/BaseClasses.meta
Normal file
8
Sample/Runtime/Models/Nodes/BaseClasses.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5cf6534e577abb45a6f0a178aba73eb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45807fa2f84655b4783b18aee34a21c9
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Misaki.GraphView.Sample
|
||||
{
|
||||
[NodeInfo("Output Node", "Output")]
|
||||
public class Output : ExecutableNode
|
||||
public class Output : BackTraceExecutableNode
|
||||
{
|
||||
[NodeInput]
|
||||
private float _input;
|
||||
|
||||
Reference in New Issue
Block a user