change port role
This commit is contained in:
parent
580e7295b3
commit
ca048af07d
@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Compilation;
|
||||
|
@ -29,7 +29,7 @@ namespace AsmdefGraph.Editor {
|
||||
if (!asmdefNodeDict.TryGetValue(dependents, out var toNode)) {
|
||||
continue;
|
||||
}
|
||||
var edge = fromNode.OutPort.ConnectTo(toNode.InPort);
|
||||
var edge = fromNode.RightPort.ConnectTo(toNode.LeftPort);
|
||||
contentContainer.Add(edge);// これが無いと線が表示されない
|
||||
}
|
||||
}
|
||||
|
@ -2,19 +2,19 @@
|
||||
|
||||
namespace AsmdefGraph.Editor {
|
||||
public class AsmdefNode : Node {
|
||||
public readonly Port InPort;
|
||||
public readonly Port OutPort;
|
||||
public readonly Port LeftPort;
|
||||
public readonly Port RightPort;
|
||||
|
||||
public AsmdefNode(string nodeName) {
|
||||
title = nodeName;
|
||||
|
||||
InPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, typeof(Port));
|
||||
InPort.portName = "In";
|
||||
inputContainer.Add(InPort);
|
||||
LeftPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, typeof(Port));
|
||||
LeftPort.portName = "Ref By";
|
||||
outputContainer.Add(LeftPort); // as right side
|
||||
|
||||
OutPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, typeof(Port));
|
||||
OutPort.portName = "Out";
|
||||
outputContainer.Add(OutPort);
|
||||
RightPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, typeof(Port));
|
||||
RightPort.portName = "Ref To";
|
||||
inputContainer.Add(RightPort); // as left side
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user