/// <summary> /// Creates all the nodes with the saved graph data /// </summary> private void CreateNodes() { foreach (var nodeData in _containerCache.dialogueNodeData) { var tempNode = _targetGraphView.CreateDialogueNode(nodeData.DialogueText, Vector2.zero, nodeData.OnEnterAction, nodeData.OnExitAction, (nodeData.condition != null) ? nodeData.condition.GetPredicate() : ""); tempNode.GUID = nodeData.GUID; tempNode.OnEnterAction = nodeData.OnEnterAction; tempNode.OnExitAction = nodeData.OnExitAction; _targetGraphView.AddElement(tempNode); var nodePorts = _containerCache.NodeLinks.Where(x => x.BaseNodeGuid == nodeData.GUID).ToList(); nodePorts.ForEach(x => _targetGraphView.AddChoicePort(tempNode, x.PortName)); } }