blueknightone / dialoguesystem Goto Github PK
View Code? Open in Web Editor NEWA basic dialogue system for Unity
License: MIT License
A basic dialogue system for Unity
License: MIT License
Describe the bug
The default sample conversation (Assets/DialogueSystem/Demo/Dialogue/Sample.asset)
throws the follwoing error:
NullReferenceException: Object reference not set to an instance of an object
lastmilegames.DialogueSystem.DialoguePlayer.GetTargetNode (lastmilegames.DialogueSystem.NodeData.NodeLinkData nodeLink) (at Assets/DialogueSystem/Scripts/DialoguePlayer.cs:48)
lastmilegames.DialogueSystem.DialoguePlayer.PlayDialogue (lastmilegames.DialogueSystem.DialogueContainer container) (at Assets/DialogueSystem/Scripts/DialoguePlayer.cs:39)
UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <e5b75411c8cd4bfaa9e760be20206f29>:0)
UnityEngine.Events.CachedInvokableCall`1[T].Invoke (System.Object[] args) (at <e5b75411c8cd4bfaa9e760be20206f29>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <e5b75411c8cd4bfaa9e760be20206f29>:0)
UnityEngine.UI.Button.Press () (at D:/Unity/2019.4.13f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at D:/Unity/2019.4.13f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at D:/Unity/2019.4.13f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at D:/Unity/2019.4.13f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update() (at D:/Unity/2019.4.13f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The sample conversation (a basic tutorial) should play
Desktop (please complete the following information):
Additional context
This happens because the conversation is empty.
Create a DialoguePlayer
component that handles displaying a dialogue and interactions through the UI.
Similar to the ShaderGraph Create node search window, move the ability to create nodes from the toolbar to the search menu.
SearchWindowProvider
and add to context menu.A node that calls an event provided by the designer. This would be useful for switching some enemies from friendly to hostile due to player's dialogue choices or a number of other features a designer may want to happen (attribute changes, faction reputation, etc.).
The node should take a List<UnityEvent>
and iterate through, calling each event.
Additional Enhancement The List<UnityEvent>
should be reorderable to control what order the events are triggered in.
Identify the Issue
When creating new ports on a Dialogue Node, the foldout label is always "Port Options" and it must be opened to see the response text or whether a condition is set.
Suggestion
When the response text is changed, update the foldout label to display the text (should be truncated). Can also add an icon to show a toggle condition has been set.
Remember: Be courteous, be constructive, be critical.
Context
This method creates and adds all of the nodes.
Identify the Issue
It's verbose and hard to navigate, and probably tries to do to much within a class.
Suggestion
Unity UIElements allows defining editor UI through an XML-like text files. This would move creating the controls out of the class, which would then simply load the UI like it currently loads in the style sheets.
Can create properties in the Graph blackboard that will search for "tagged text" in dialogue nodes and replace it with the property value.
Can create a Scriptable Object that contains all the properties and extend the blackboard to load the properties from the scriptable object or from the blackboard.
Convert nodes into ScriptableObjects
that are saved as a sub-asset of the DialogueContainer
.
Immediate advantages include:
Describe the bug
If you create a dialogue node with a choice (say if you want an choice button that has a custom label), the choice button throws a "mismatched number of links and responses" and no choice button is generated.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The choice button with the custom text should appear and clicking on it should end the conversation.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.