First commit

This commit is contained in:
Misaki
2024-11-02 17:58:52 +09:00
commit e645a5327b
153 changed files with 3729 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#if UNITY_EDITOR
using Misaki.GraphView.Editor;
#endif
namespace Misaki.GraphView.Sample
{
[NodeInfo("Add", "Math")]
public class AddNode : BackTraceBaseNode
{
[NodeInput]
#if UNITY_EDITOR
[InspectorInput]
#endif
public float a;
[NodeInput]
#if UNITY_EDITOR
[InspectorInput]
#endif
public float b;
[NodeOutput]
private float _result;
protected override void OnExecute()
{
_result = a + b;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: fe1c51aa37dba09468a65f5594146083

View File

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

View File

@@ -0,0 +1,16 @@
namespace Misaki.GraphView.Sample
{
public abstract class BackTraceBaseNode : BaseNode
{
protected override void OnPullData(Slot input)
{
if (input.LinkedSlotData.Count == 0)
{
return;
}
var outputNode = GraphObject.GetNode(input.LinkedSlotData[0].nodeID);
outputNode.Execute();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a761276bd0f3a4a4cb4b0894d193f4cd

View File

@@ -0,0 +1,16 @@
using UnityEngine;
namespace Misaki.GraphView.Sample
{
[NodeInfo("Output Node", "Output")]
public class OutputNode : BackTraceBaseNode
{
[NodeInput]
private float _input;
protected override void OnExecute()
{
Debug.Log(_input);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 42ed2641b4fc11240be0abda76236178