(GraphView) How to handle duplicated edge connection

Hi, I’m investigating GraphVIew API for my own toolset and have a question about handling duplicated edge.

So, the problem is that IEdgeConnectorListener.OnDrop() is called even there is already connected edge. Should I check myself whether edge is already exists or is there API for checking duplicated edge, like GraphView.ContainsEdge(Edge)?

Thanks.

Ports in GraphView have a mode that sets whether they accept multiple edges or can only have one edge connected. I believe its called “Capacity” or something like that. Worth a look.

That said, please keep in mind that GraphView is not a supported API. It is currently only for internal use and marked Experimental.

Thanks for reply. I know that it is currently not supported publicly. So my purpose is only investigating and experiment.

Anyway, Port with Capacity = Capacity.Single also allowed muliple connection even with same start-port and end-port. So it seems that duplication check is my own responsibility.

Bummer, that seems like a bug. It should not allow multi-connection. Is this for an Input port or Output port?

Both intput and output port can create multiple edges. I checked ShaderGraph’s code and found that ShaderGraph manually delete exsting edges in GraphData.ConnectNoValidate().

I reported my minimum reproducible project as Case 1165438.

Yeah, I have the same issue using 2019.1.0f2.