siccity / dialogue Goto Github PK
View Code? Open in Web Editor NEWNode based dialogue system
License: MIT License
Node based dialogue system
License: MIT License
When writing an extensive dialogue the lack of shortcuts are draining.
Simple stuff like adding another chat response requires you to move the mouse down to click a small button, then move your mouse back to select the field, before you can actually start typing... then repeat on next response. There should be a keyboard shortcut to add a response and select the text field automatically.
I did a quick dive into this and as usual we trust unity to have our back and is thoroughly disappointed. It turns out to be a quick way to make your neat CustomNodeEditors into ugly monsters. Custom action enum, custom action node reference, loads of if this do this weird thing, etc. Polluting the nice clean flow of the editors.
I believe what is needed is command mechanism that is hooked into the NodeEditorGUILayout so that all the ugly boilerplate code that makes it works is hidden away.
If we imagine that we added some context, scattered throughout the editor codebase.
NodeEditor.PushContext(node.GetInstanceID());
NodeEditor.PushContext("ChatEditor");
NodeEditor.PushContext("Answer "+i);
Then we could simply do something like this
IssueCommand(Commands.CreateConnectedChat);
IssueCommand(Commands.CreateAnswer);
The commands should ofcourse wait till a suitable time in the gui flow to add the new stuff, repaint and even focus the newly created items. So CreateConnectedChat would do something like this:
var output = GetOutputPort(command.CallerLocation);
var newChat = command.graph.AddNode<Chat>();
newChat.position = GetNode(command.CallerLocation).position + new Vector2(450, 0f); // ???
output.Connect(newChat.GetInputPort("input"));
IssueCommand(Commands.FocusControl, ConstructContext(newChat.GetInstanceID(), "ChatEditor", "text"));
Of course the NodeEditorGUILayout should be responsible for setting up the control name and applying the focus on the next repaint.
You can't tint with bright color. They too dark and you didn't see labels at it.
Colors for backgrounds are inlined and tangled with code, they need to be in settings window at my opinion.
Currently there is no any method that's called for initializing your gui stuff, since it doesn't inherit from ScriptableObject nor, Behaviour.
Would be nice to have some virtual method/prop to override window's title content in NodeGraphEditor. Btw, some reference to actual NodeEditorWindow class would also be handy.
Do you plan to go further this project? any roadmap?
There are some places in code that assumes there is always only one graph opened at time, like
NodeEditorWindow.current
While generally multi editor windows works, there are some exceptions thrown. Afair they relate to assigning/getting window preferences.
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.