Example #1
0
        public override Node Create(Vector2 pos)
        {
            ConversationStartNode node = CreateInstance <ConversationStartNode>();

            node.rect = new Rect(pos.x, pos.y, 220, 150);
            node.name = "Conversation Start Node";

            node.CreateOutput("Next Node", "DialogForward", NodeSide.Right, 30);

            return(node);
        }
Example #2
0
 public override void BeforeSavingCanvas()
 {
     foreach (Node node in this.nodes)
     {
         if (node is ConversationStartNode)
         {
             convStartNode = node as ConversationStartNode;
             description   = (node as ConversationStartNode).description;
         }
     }
     if (convStartNode == null && nodes.Count > 0)
     {
         UnityEditor.EditorUtility.DisplayDialog("Warning!", "Dialog Editor cant find any dialog start node in this canvas. The canvas will still get saved, but please add the start node.", "Close");
     }
 }