public void CreateEdgeView(EdgeView edgeView)
        {
            if (edgeView?.input == null || edgeView?.output == null)
            {
                return;
            }

            Undo.RegisterCompleteObjectUndo(NodeGraph, "Created New Edge");
            edgeView.Setup();

            NodeView firstNode = edgeView.FirstPort.Node;

            // Outports can only have one edge connected to them.
            if (firstNode.OutportHasEdge(edgeView.FirstPort.PortIndex))
            {
                firstNode.RemoveEdge(firstNode.GetEdgeViewByPortIndex(edgeView.FirstPort.PortIndex));
            }

            edgeView.FirstPort.Node.AddEdge(edgeView);
            m_nodeListProp.serializedObject.Update();
        }
        public void OnLoadView()
        {
            m_nodeGraphView.OnBlackboardElementChanged += HandleOnBlackboardElementChanged;

            SerializedProperty outports = SerializedNode.FindPropertyRelative(ANode.OutportsVarName);

            for (int k = 0; k < outports.arraySize; k++)
            {
                SerializedProperty outportProp = outports.GetArrayElementAtIndex(k);
                if (!OutportEdge.IsValid(outportProp))
                {
                    continue;
                }
                EdgeView edgeView = new EdgeView()
                {
                    OutportEdgeProp = outportProp,
                    input           = m_nodeGraphView.GetNodeViewById(outportProp.FindPropertyRelative(OutportEdge.ConnectedNodeIdVarName).stringValue).m_inport,
                    output          = m_outports[k],
                };
                edgeView.Setup();
                AddEdgeView(edgeView);
            }
        }