Conversation node graph

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
magalter
Posts: 6
Joined: Fri Sep 26, 2014 7:48 am

Conversation node graph

Post by magalter »

Probably this is more off topic but I'm really curious how you made the the node graph in the editor window for conversations. It is the same node graph that unity's mechanim animator controller uses, but I couldn't find any clue how to create such node graphs with the unity editor scripting API.
User avatar
Tony Li
Posts: 22093
Joined: Thu Jul 18, 2013 1:27 pm

Conversation node graph

Post by Tony Li »

Hi,



The Dialogue System provides complete C# source code. Feel free to unpack Scripts/Source Code.unitypackage to browse through the editor code. You'll probably want to unpack it in a new project so the source scripts won't conflict with DLLs. The runtime code (the code that ships with your game projects) is cleanly and efficiently designed, but the Dialogue Editor code, while solid, isn't as nicely compartmentalized. It's implemented in one mammoth class spread across several files.



I started with the base code provided by unimechanic (a UT employee) on the Unity forums, and added code as necessary to make it look like the Mecanim canvas.



You can find the relevant files in Scripts/Core/Editor/Dialogue Editor/Conversation Node Editor/:



DialogueEditorWindowConversationNodeEditorBase.cs: Contains generic functionality that should apply to any Mecanim-style node editor.

DialogueEditorWindowConversationNodeEditor.cs: Contains most of the functionality of the node editor as it applies to the Dialogue Editor.

magalter
Posts: 6
Joined: Fri Sep 26, 2014 7:48 am

Conversation node graph

Post by magalter »

Ah, ok thank you very much :D
Post Reply