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