From b25150706a8d6e1fe2d6e0fd7d47e602a60f16b7 Mon Sep 17 00:00:00 2001 From: Spebby <47935791+Spebby@users.noreply.github.com> Date: Wed, 26 Apr 2023 12:47:17 -0700 Subject: [PATCH 1/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5e9aa2..5730aeb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Node Based Dialogue System for Unity -This is a node-based visual narrative flow creation tool that uses Unity's GraphView API. +This is Spebby's branch of Mert Kirimgeri's Node-Based visual narrative flow creation tool that uses Unity's GraphView API. ![](https://i.ibb.co/JngH8yr/header.png) ## Features From a9b2a2684b1b8ce60e5ea76423087e4c90a93b23 Mon Sep 17 00:00:00 2001 From: Spebby <47935791+Spebby@users.noreply.github.com> Date: Wed, 26 Apr 2023 12:47:44 -0700 Subject: [PATCH 2/7] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e25d4d..eec5e53 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ "category": "Visual Scripting", "repository": { "type": "git", - "url": "https://github.com/m3rt32/NodeBasedDialogueSystem.git" + "url": "https://github.com/Spebby/NodeBasedDialogueSystem.git" } } From d2d9ef13c21808abdd726cc92a22e11d6ceebf51 Mon Sep 17 00:00:00 2001 From: Spebby Date: Wed, 26 Apr 2023 15:13:22 -0700 Subject: [PATCH 3/7] reformatting --- Samples/DialogueSystemDemo/DialogueParser.cs | 39 ++-- ...oguesystem.meta => com.DialogueSystem.meta | 0 .../Editor.meta | 0 .../Editor/Graph.meta | 0 .../Editor/Graph/NodeSearchWindow.cs | 23 +- .../Editor/Graph/NodeSearchWindow.cs.meta | 0 .../Editor/Graph/StoryGraph.cs | 71 +++--- .../Editor/Graph/StoryGraph.cs.meta | 0 .../Editor/Graph/StoryGraphView.cs | 96 +++----- .../Editor/Graph/StoryGraphView.cs.meta | 0 com.DialogueSystem/Editor/GraphSaveUtility.cs | 196 ++++++++++++++++ .../Editor/GraphSaveUtility.cs.meta | 0 .../Editor/Nodes.meta | 0 .../Editor/Nodes/DialogueNode.cs | 11 + .../Editor/Nodes/DialogueNode.cs.meta | 0 .../Editor/Resources.meta | 0 .../Editor/Resources/NarrativeGraph.uss | 0 .../Editor/Resources/NarrativeGraph.uss.meta | 0 .../Editor/Resources/Node.uss | 0 .../Editor/Resources/Node.uss.meta | 0 .../Subtegral.DialogueSystem.Editor.asmdef | 0 ...ubtegral.DialogueSystem.Editor.asmdef.meta | 0 .../Runtime.meta | 0 .../Runtime/CommentBlockData.cs | 15 ++ .../Runtime/CommentBlockData.cs.meta | 0 .../Runtime/DialogueContainer.cs | 17 ++ .../Runtime/DialogueContainer.cs.meta | 0 .../Runtime/DialogueNodeData.cs | 14 ++ .../Runtime/DialogueNodeData.cs.meta | 0 com.DialogueSystem/Runtime/ExposedProperty.cs | 13 ++ .../Runtime/ExposedProperty.cs.meta | 0 ...ueSystem.com.DialogueSystem.Runtime.asmdef | 0 ...tem.com.DialogueSystem.Runtime.asmdef.meta | 0 com.DialogueSystem/Runtime/NodeLinkData.cs | 13 ++ .../Runtime/NodeLinkData.cs.meta | 0 .../Editor/GraphSaveUtility.cs | 217 ------------------ .../Editor/Nodes/DialogueNode.cs | 15 -- .../Runtime/CommentBlockData.cs | 14 -- .../Runtime/DialogueContainer.cs | 15 -- .../Runtime/DialogueNodeData.cs | 13 -- .../Runtime/ExposedProperty.cs | 14 -- .../Runtime/NodeLinkData.cs | 13 -- 42 files changed, 367 insertions(+), 442 deletions(-) rename com.subtegral.dialoguesystem.meta => com.DialogueSystem.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Graph.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Graph/NodeSearchWindow.cs (82%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Graph/NodeSearchWindow.cs.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Graph/StoryGraph.cs (66%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Graph/StoryGraph.cs.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Graph/StoryGraphView.cs (74%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Graph/StoryGraphView.cs.meta (100%) create mode 100644 com.DialogueSystem/Editor/GraphSaveUtility.cs rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/GraphSaveUtility.cs.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Nodes.meta (100%) create mode 100644 com.DialogueSystem/Editor/Nodes/DialogueNode.cs rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Nodes/DialogueNode.cs.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Resources.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Resources/NarrativeGraph.uss (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Resources/NarrativeGraph.uss.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Resources/Node.uss (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Resources/Node.uss.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Subtegral.DialogueSystem.Editor.asmdef (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Editor/Subtegral.DialogueSystem.Editor.asmdef.meta (100%) rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Runtime.meta (100%) create mode 100644 com.DialogueSystem/Runtime/CommentBlockData.cs rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Runtime/CommentBlockData.cs.meta (100%) create mode 100644 com.DialogueSystem/Runtime/DialogueContainer.cs rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Runtime/DialogueContainer.cs.meta (100%) create mode 100644 com.DialogueSystem/Runtime/DialogueNodeData.cs rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Runtime/DialogueNodeData.cs.meta (100%) create mode 100644 com.DialogueSystem/Runtime/ExposedProperty.cs rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Runtime/ExposedProperty.cs.meta (100%) rename com.subtegral.dialoguesystem/Runtime/Subtegral.DialogueSystem.Runtime.asmdef => com.DialogueSystem/Runtime/NodeBasedDialogueSystem.com.DialogueSystem.Runtime.asmdef (100%) rename com.subtegral.dialoguesystem/Runtime/Subtegral.DialogueSystem.Runtime.asmdef.meta => com.DialogueSystem/Runtime/NodeBasedDialogueSystem.com.DialogueSystem.Runtime.asmdef.meta (100%) create mode 100644 com.DialogueSystem/Runtime/NodeLinkData.cs rename {com.subtegral.dialoguesystem => com.DialogueSystem}/Runtime/NodeLinkData.cs.meta (100%) delete mode 100644 com.subtegral.dialoguesystem/Editor/GraphSaveUtility.cs delete mode 100644 com.subtegral.dialoguesystem/Editor/Nodes/DialogueNode.cs delete mode 100644 com.subtegral.dialoguesystem/Runtime/CommentBlockData.cs delete mode 100644 com.subtegral.dialoguesystem/Runtime/DialogueContainer.cs delete mode 100644 com.subtegral.dialoguesystem/Runtime/DialogueNodeData.cs delete mode 100644 com.subtegral.dialoguesystem/Runtime/ExposedProperty.cs delete mode 100644 com.subtegral.dialoguesystem/Runtime/NodeLinkData.cs diff --git a/Samples/DialogueSystemDemo/DialogueParser.cs b/Samples/DialogueSystemDemo/DialogueParser.cs index a0942eb..acc414a 100644 --- a/Samples/DialogueSystemDemo/DialogueParser.cs +++ b/Samples/DialogueSystemDemo/DialogueParser.cs @@ -1,13 +1,11 @@ -using System; -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; +using NodeBasedDialogueSystem.com.DialogueSystem.Runtime; using TMPro; using UnityEngine; using UnityEngine.UI; -using Subtegral.DialogueSystem.DataContainers; -namespace Subtegral.DialogueSystem.Runtime +namespace NodeBasedDialogueSystem.Samples.DialogueSystemDemo { public class DialogueParser : MonoBehaviour { @@ -18,36 +16,27 @@ public class DialogueParser : MonoBehaviour private void Start() { - var narrativeData = dialogue.NodeLinks.First(); //Entrypoint node - ProceedToNarrative(narrativeData.TargetNodeGUID); + var narrativeData = dialogue.nodeLinks.First(); //Entrypoint node + ProceedToNarrative(narrativeData.targetNodeGuid); } - private void ProceedToNarrative(string narrativeDataGUID) + private void ProceedToNarrative(string narrativeDataGuid) { - var text = dialogue.DialogueNodeData.Find(x => x.NodeGUID == narrativeDataGUID).DialogueText; - var choices = dialogue.NodeLinks.Where(x => x.BaseNodeGUID == narrativeDataGUID); + var text = dialogue.dialogueNodeData.Find(x => x.nodeGuid == narrativeDataGuid).dialogueText; + IEnumerable choices = dialogue.nodeLinks.Where(x => x.baseNodeGuid == narrativeDataGuid); dialogueText.text = ProcessProperties(text); - var buttons = buttonContainer.GetComponentsInChildren