Tutorials for building a Dialogue UI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
dmitrybond
Posts: 1
Joined: Fri Mar 15, 2024 4:37 pm

Tutorials for building a Dialogue UI

Post by dmitrybond »

Hey folks,

I'm just learning the Dialogue UI and the question I have is related to building/customizing the code that links together the Dialogue UI logic and how it is represented in the Scene.

Right now I feel like I'm throwing a Dialogue Manager, attaching canvas elements and then everything happens automagically - but I don't understand what is happening under the hood and so I can't add one more "adapter" to support Nova UI or UI Toolkit or anything else.

To learn how to do that, I want to do an exercise for myself and build something ultra simple:
* When someone says something in a Dialog, I just want to do "Debug.log(" the name of who said it + the subtitle
* When I press numbers 1-5 on keyboard, it selects the corresponding reply, if currently the replies are shown

How can I do this? Where do I start? Is there some kind of tutorial or examples?

Thanks!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tutorials for building a Dialogue UI

Post by Tony Li »

Hi,

Dialogue UIs just need to implement a few methods in a C# interface called IDialogueUI.

To get an idea of how the StandardDialogueUI scripts implement IDialogueUI, see the Dialogue UI Tutorial Videos.

Then, if you want to use Nova or UITK, duplicate the starter template script TemplateDialogueUI.cs, move your copy into your own scripts folder, rename it, and add your code (e.g., Debug.Log() calls) where the comments indicate. Then add the script to a GameObject and assign the GameObject to the Dialogue Manager's Display Settings > Dialogue UI field.
Post Reply