Fixed the bug that RealyNode can not connect and disconnect correctly.

This commit is contained in:
Misaki
2024-11-07 21:13:01 +09:00
parent 5ac1081d32
commit e15570459c
6 changed files with 121 additions and 112 deletions

View File

@@ -96,6 +96,14 @@ namespace Misaki.GraphView
_connections.Add(connection);
}
public void AddConnections(IEnumerable<SlotConnection> connections)
{
foreach (var connection in connections)
{
AddConnection(connection);
}
}
public void RemoveConnection(SlotConnection connection)
{
_connections.Remove(connection);

View File

@@ -68,6 +68,12 @@ namespace Misaki.GraphView
return;
}
var connectedOutputNode = graphObject.GetNode(_inputSlot.LinkedSlotData[0].nodeID);
if (connectedOutputNode is IExecutable executable)
{
executable.Execute();
}
_outputSlot.ReceiveData(_inputSlot.value);
_outputSlot.PushData(null);