Unity Dialogue System - Creating the Base Group

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Our nodes now have a style and our ports can be connected with each other. That pretty much means most of our nodes are done. However, there is one other feature in the final dialogue system which involves groups. Groups are simply a way for you to group your nodes. We'll be using it to make it easier to organize and select the starting dialogue. The way we'll be adding Groups is through the contextual menu, much like our nodes, so let's go ahead to our GraphView script and add a new manipulator, in which I'll pass in a method we'll create named "CreateGroupContextualMenu". Inside this method we'll just paste in the same code as our "CreateNodeContextualMenu" method. Of course, we can remove our "actionTitle" here and type in "Add Group", and instead of calling "CreateNode" we'll call a new method named "CreateGroup". In this method we'll be accepting a title and a position, so let's swap our "dialogueType" with the name of the group instead, which will be "DialogueGroup". To create a Group, we will need to create a variable of type "Group", which is a GraphView class. I'll name it "group" and call its constructor. To update the name of the group, we update its "title" variable, to which we'll be sending in our title parameter. We will also set its position using the "SetPosition" method. When that's done, simply return the group and make sure to swap the "GraphElement" return type to "Group" instead. If we save and go to Unity, we should now be able to add in a new group. The cool thing about this, is that we can now place our nodes inside of this group by dragging them into it, and remove them be pressing "shift" and then dragging them out. The GraphView class also provides us with some cool callbacks when we do these actions, that we'll be using later on.
Info
Channel: Indie Wafflus
Views: 318
Rating: undefined out of 5
Keywords: Unity Dialogue System, Unity Dialog System, Unity Graph View, Unity Node, Unity Groups, Unity UI Toolkit, Unity Dialogues, Unity Node Based Dialogue System, Dialogue System, Node Based Dialogue System, Unity Dialogs, Unity Visual Elements, Node System, Dialogue System Tutorial, Unity 2D, Unity, Unity Tutorial, Unity Dialogue System Tutorial, Unity 3D, Unity3D, Unity2D
Id: yRBAdzK2sUU
Channel Id: undefined
Length: 2min 33sec (153 seconds)
Published: Sun Jul 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.