Add NPC & Dialogue System in Unity 2D 🎮

Learn to add NPCs and dialogue interactions in your top-down Unity 2D game with this step-by-step guide.

Add NPC & Dialogue System in Unity 2D 🎮
Game Code Library
18.1K views • Feb 23, 2025
Add NPC & Dialogue System in Unity 2D 🎮

About this video

Let's add interacting with NPCs to our game! So when we walk over and press our Interact button, a Dialogue Box will open and show the text typing out letter by letter. We'll also add a voice sound effect for each letter shown! If we're impatient we'll add auto-completing as well as auto-progressing to the next line. Everything you could want out of NPC dialogue!!!

You can follow the playlist 🐸 to this top down base template!
Full Playlist: https://www.youtube.com/playlist?list=PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP

Get the code: https://www.patreon.com/posts/add-npc-and-to-122871257
Download the Top Down Template🐸: https://gamecodelibrary.itch.io/top-down-2d-base-template

Sprite sheet: https://pixel-boy.itch.io/ninja-adventure-asset-pack

All source code for all videos I have made and will make in the future can be found on my Patreon:
https://www.patreon.com/GameCodeLibrary

Be sure to subscribe to see what kind of adventure we can go on together! I'm excited! :-)

If you have any suggestions, feedback or questions, be sure to comment below! Any opinions will help me out on this journey ♡

Check out the full platformer playlist!
https://www.youtube.com/playlist?list=PLaaFfzxy_80EWnrTHyUkkIy6mJrhwGYN0

BUY THE COMPLETE PLATFORMER GAME TEMPLATE NOW!!!
https://gamecodelibrary.itch.io/2d-platformer-template
https://www.patreon.com/GameCodeLibrary/shop

#unity #gamedev #gamedevelopment #unity2d #topdown

0:00 - Intro
0:20 - NPC GameObject
2:30 - NPCDialogue ScriptableObject Script
4:19 - OldMan NPCDialogue
5:57 - NPC Script
13:45 - DialogueData
14:00 - Dialogue Box UI
17:03 - Test Dialogue!
17:58 - Voice Sound Effect
20:26 - Test Voice!
20:57 - Girl NPC Example
21:39 - Girl Test!
21:51 - Next Video
22:00 - Get the Code
22:27 - Outro

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

18.1K

Likes

443

Duration

22:35

Published

Feb 23, 2025

User Reviews

4.6
(3)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.