How to Create a Dialogue System With Choices In Unity | Unity Game Dev Tutorial

preview_player
Показать описание
In this Unity game development tutorial, I'll show you how to create a dialogue system with choices using Unity's built-in tools. This interactive system is perfect for creating immersive games with branching narratives.

Whether you're a beginner or an experienced game developer, this tutorial is a must-watch for anyone wanting to add a dynamic dialogue system to their game. With step-by-step instructions, you'll learn how to create a seamless dialogue experience for your players. Don't miss out on this essential game dev skill!

This is a super simple approach that I've come up with after years of building my own systems and buying assets on the store.

With this approach, it's very flexible, easy to grasp and can be expanded to include more features such as:

Quests, RPG Stats (charisma, etc), meaningful choices.

Source code:
Рекомендации по теме
Комментарии
Автор

I can't believe how well this freaking worked. After a day and a half of dredging through other dialogue tutorials, this one worked right after figuring out the Layout Group component of the button parent. Precisely useful!

PnchngBg
Автор

For those who may have had issues with buttons stacking 1:03 as part of the button parent there is a Layout Group.that will stop them stacking. Missed it on my first watch!

clodaghdooley
Автор

Thank you so much! Super helpful learning a ton!

rangoDanger
Автор

This is great! Thank you!
I'd love to expand on it for my projects, if only I knew how. I'd like to have it set up so that the player's responses also display on screen in their own dialogue UI box, and have the responses from the player and NPC alternate (like a real conversation). I would also like to have a timer for each sentence, for voice acting, so that after the timer reaches zero for that sentence, it plays the next sentence. The only other thing I would like to add would be allowing the NPC to have several lines of dialogue in a row, like in modern RPG's that are pretty dialogue heavy, in case the NPC needs to explain some additional context or story to the player that can't be explained in a single line of dialogue.

jasonkay
Автор

Great video! Do you have an idea why my response button doesn't work? If I click on the button, it won't go to the next node...

maauulyy
Автор

If anyone have a problem with "Serialization depth limit 10 exceeded" etc. Make the DialogueNode into a scriptableObject. Now when you want to add a "nextNode" just create a new DialogueNode.

benim
Автор

Hello! Thanks for the tutorial but I'm having a warning from unity: serialization depth limit 10 exceeded at DialogueNode.options. There may be an object comppsition cycle in one or more of your serialized classes. Do you know how to fix that? Thank you!

TheSimon-dhne
Автор

Hey! I've put this in, and there's a real problem with Serialisation Depth. After 4 replies, the system just stops showing "Next Node".
Is there a way around this? It's just about perfect for my needs, otherwise.

richardstamp
Автор

Hi, I really appreciate your work. My coworker and I used it for our game, but we have a question. We used it for two dialogues with two NPC, but the response of the buttons to activate the dialogue is not very responsive. Do you know how we can fix it? Thank you again for this video

edoardocarlani
Автор

question: Is there a code where you can make dialogue appears when encountered npc?

mahmudsilver
Автор

The video skipped as you were talking about the buttons' setup. Don't know if anything crucial was left out, but the buttons do not work as they should.

Edit: Adding the horizontal layout group component to my buttons' holder fixed everything. I'm a noob, I don't know why, but its working as it should now 👾💯

eskooUTD
Автор

This doesn't seem optimal as you would have to write the same text over and over for when a branches converge.

ultimateriddlemaker
Автор

thx for the tutorial! I will look at ur other video now! maybe I will sub... if i dare!

Klibbe_dev