// Tie the nodeView to its data public void ConnectToData(AbstractMaterialNode inNode, IEdgeConnectorListener connectorListener) { if (inNode == null) { return; } // Set references node = inNode; title = ""; m_ConnectorListener = connectorListener; viewDataKey = node.guid.ToString(); // Set the VisualElement's position SetPosition(new Rect(node.drawState.position.x, node.drawState.position.y, 0, 0)); AddSlots(node.GetSlots <MaterialSlot>()); // Removing a divider that made the ui a bit ugly VisualElement contents = mainContainer.Q("contents"); VisualElement divider = contents?.Q("divider"); if (divider != null) { divider.RemoveFromHierarchy(); } }