Animated Dialogue System - Unity Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น •

  • @angrygeri7026
    @angrygeri7026 3 ปีที่แล้ว +14

    I cannot believe you just posted what I was looking for.

  • @BrassBoii
    @BrassBoii 3 ปีที่แล้ว +4

    Wait wait wait... I told you about the Input provider trick some months ago, and now i come back, and you have 37k subscribers... Well done Zyger! And well deserved aswell! Keep up the hard work! All love from here!

  • @hermanator5543
    @hermanator5543 3 ปีที่แล้ว +6

    OMG, you just read my mind! That’s what I needed!!! Thanks!

  • @deprecat6925
    @deprecat6925 2 ปีที่แล้ว

    This is a great tutorial! Works like a charm and it's super simple to set up.
    One issue I want to mention is if you're trying to take advantage of rich text, such as bolding text, changing colors, etc, this method will be very messy. It doesn't interpret the tags until it's fully spelled out, leading to it typing out those characters until it's all typed out and it can render the rich text properly.
    If you're plan is to use this tutorial but also want to leverage rich text, you'll need to consider another way.

  • @rmurphy6830
    @rmurphy6830 3 ปีที่แล้ว +1

    Good video, I'm Brazilian so I'm trying to learn how to program from time to time, and I was taking a beating to make a dialog system (mainly because most videos are English, and I definitely don't speak English decently) but your video did it get into my potato brain.
    A little hug from Brazil :)

  • @RobLang
    @RobLang 3 ปีที่แล้ว +2

    Neat tutorial! When you check for sentence length you can do Index < Sentences.Length. 👍

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว +1

      Thanks ! Oh yeah just realised I could of just used the

  • @Svebderman
    @Svebderman 3 ปีที่แล้ว +6

    The thing is that i now develop apps in visual studio itself otherwise u wouldve been a great help!

  • @delicateants
    @delicateants 3 ปีที่แล้ว

    This came out right as I needed it

  • @shubhamvernekar7701
    @shubhamvernekar7701 3 ปีที่แล้ว +1

    I downloaded twitch only to see your stream and learn from it😁

  • @ZygerGFX
    @ZygerGFX  3 ปีที่แล้ว +17

    There is a slight bug where if the player tries to continue the text while its still typing the text appears all messed up. to fix this issue we need to be able to stop the player from continuing the text while its still typing. So create a private bool called nextText and set it to true (private bool nextText = true;). And in the update function where you call NextSentece(); create an if statement checking whether the bool is true. then in that if statement set the nextText = false; (ensure this is set before actually calling the nextSentence(); function). Finally where you have Index++; write on a new line nextText = true; - this should fix the issue!

    • @buckieblu
      @buckieblu 3 ปีที่แล้ว

      BuckO here ^^
      Hope this helps for the rest of the community ^^

    • @nurnadhirah2981
      @nurnadhirah2981 3 ปีที่แล้ว

      how to write this? i dont understand 😅

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว

      @@nurnadhirah2981 Write it in the same script that was used in the tutorial

    • @s.h9365
      @s.h9365 3 ปีที่แล้ว

      @@ZygerGFX hi i already do this but whenever i try to start the text again, the text not gonna show up

    • @schurkino
      @schurkino ปีที่แล้ว

      IEnumerator WriteSentence()
      {
      foreach(char character in sentenceArray[stringIndex].ToCharArray())
      {
      textBox.text += character;
      textTypingDone = false;
      yield return new WaitForSeconds(0.025f);
      }
      textTypingDone = true;
      }

  • @dhruvranger5710
    @dhruvranger5710 3 ปีที่แล้ว +5

    can you do one with choices?

  • @TheRolfFR
    @TheRolfFR 3 ปีที่แล้ว +1

    Nice and simple, dialogue systems are a good beginner example in UI. I would definitely think about teaching this.
    Note : Your shadow is not very natural because you tried to make a drop show. But its size is bigger than the object.
    That wouldn't be a problem is the vertical lines weren't parallel to the object (meaning that the light is not full facing the object)
    But here you have a positive vertical offset meaning the light is higher than your dialog. Then the shadow would be like / \

  • @justaguynotamanyouwouldkno2207
    @justaguynotamanyouwouldkno2207 3 ปีที่แล้ว +3

    Hey I love your videos, keep up the good work. ❤💙💜💖💗💘

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว

      Thank you !

  • @PrivacyNProgramming
    @PrivacyNProgramming 3 ปีที่แล้ว

    For thoese who can't see the text in game, try using world space in Canvas to fix it, sometimes changing it to other mode also helps, just a thing i found out that some mode hide the text

  • @avivyoukerharel2140
    @avivyoukerharel2140 3 ปีที่แล้ว +1

    Great tutorial, Simple and nice.

  • @vkapoor69
    @vkapoor69 ปีที่แล้ว

    Awesome video. Exactly what I needed :)

  • @turtlegamer8065
    @turtlegamer8065 3 ปีที่แล้ว +1

    Information = Useful; 😀 Love the Videos!

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว

      thanks :)))

  • @michaelshollaj6428
    @michaelshollaj6428 3 ปีที่แล้ว

    Very helpful tutorial, love your content, keep going 🔥

  • @S8EdgyVA
    @S8EdgyVA ปีที่แล้ว

    I did what you did but called the variables different names, so I have "Char character in words[noelle]", which as a UT;DR fan, I find hysterical, given I didn't know this is what I'll end up doing

  • @maxdev3255
    @maxdev3255 3 ปีที่แล้ว

    awesome as always

  • @PrivacyNProgramming
    @PrivacyNProgramming 3 ปีที่แล้ว

    inumerator, more like, i love this tutorial video(joke from dani but changed, luv your vids :)

  • @_Garm_
    @_Garm_ 3 ปีที่แล้ว +1

    a fun litel tutorial! :D

  • @Swiggies
    @Swiggies 3 ปีที่แล้ว +3

    Something I have noticed from watching your videos for a long time now is that you seem to have an over-reliance on coroutines. Coroutines are great but not for something like this. Coroutines are much better used for something that doesn’t necessarily need to run in the main thread such as background processing of data over multiple frames. Due to your coroutine not running in your main thread/Update loop you’ll find that if you wanted to scale this system up you’ll run into bugs caused by race conditions.
    For example, you can’t handle input in a coroutine so if you wanted to make it so you could skip a sentence? You could probably make it so it clears the text, and starts on the other. But your coroutine is already processing the old text so you’ll also have to restart the coroutine. It just becomes a constant battle against your code.

    • @user-gl1ls1jx3h
      @user-gl1ls1jx3h 3 ปีที่แล้ว +3

      Actually, you're thinking about multithreading. Coroutines still run on the main thread, they just run over multiple frames. It's more similar to async/await than it is to multithreading.

  • @sujalvc
    @sujalvc 3 ปีที่แล้ว

    Wow, needed that

  • @ianishvijay
    @ianishvijay 3 ปีที่แล้ว

    very helpful video!

  • @TheCatMurgatroyd
    @TheCatMurgatroyd 2 ปีที่แล้ว +1

    I need help ;_; This works really really good, but how do I expand it? how do I use it again for another character or the same character but different conversation? Do I just copy the script over and over or is there a better way?

  • @einsotek2876
    @einsotek2876 3 ปีที่แล้ว

    Great video! :)
    Could you show how to make a response system for this?

  • @emanuelcarvalho7736
    @emanuelcarvalho7736 3 ปีที่แล้ว

    Great tutorial, help me! how can i make the dialogue come back with a back button?

  • @SpaceMango
    @SpaceMango 3 ปีที่แล้ว

    This works great! I wonder how i can make it so it interacts with objects or NPC's?

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว +1

      Hi thank you. You can call the event when you collide with an npc or object or maybe once you actively click on them to talk? it can be used in many ways just by calling a function with the dialogue.

  • @justsomerandoontheinternet865
    @justsomerandoontheinternet865 3 ปีที่แล้ว

    Nice, very cool

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว

      thank you !

  • @quirkyzigzag
    @quirkyzigzag 3 ปีที่แล้ว +1

    help!!!! mine comes out like this:
    hello
    I llllllliiiiiiiiikkkkkkkkeeeeeee
    fiiiiiiissssssshhhhhh
    dddddooooo yooouuuuuuu
    how do i fix this?

  • @GH05T-S0LDI34
    @GH05T-S0LDI34 3 ปีที่แล้ว +1

    I wonder if it can be modified where when the cat asks a question we can answer it maybe it can be implemented but im not sure anyway how's going with the development of the game i hope doing great anyway i hope you all the luck on it and stay safe 😊👍

  • @johng5295
    @johng5295 2 ปีที่แล้ว

    Great.

  • @CodeOverloaded
    @CodeOverloaded 3 ปีที่แล้ว +1

    I am your new subscriber

  • @bryanfernandodinata9506
    @bryanfernandodinata9506 3 ปีที่แล้ว

    how do i make this to change image for each character talking in the dialogue

  • @ShadowMastersLP
    @ShadowMastersLP 3 ปีที่แล้ว

    Great tutorial, I didn't know you can asign-add characters to TextMeshPro :) One suggestion, why using Index

  • @oyunlarveparodiler3221
    @oyunlarveparodiler3221 3 ปีที่แล้ว +1

    This is hrlpfull

  • @GRNDHSGRL
    @GRNDHSGRL 3 ปีที่แล้ว

    Would you have to set up the dialogue manager for like every npc in a scene if you wanted to talk to multiple characters?

  • @hermanator5543
    @hermanator5543 3 ปีที่แล้ว +1

    Guys, is it just in my code or when you interrupt the dialogue system text and you load the next text your sentence appears all messed up?

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว

      did you remember to set the text to " " when you load a sentence. If you make sure to set it to nothing before loading text then you should be fine. let me know if you have any issues. or message me on discord and I cant help you trouble shoot the problem. Zyger#3045

    • @angrygeri7026
      @angrygeri7026 3 ปีที่แล้ว

      @@ZygerGFX I added you!
      Mine gets messed up too, but I think it's because it's still writing the last sentence. I don't really know how to fix it tho :(

    • @buckieblu
      @buckieblu 3 ปีที่แล้ว

      @@angrygeri7026 Same issue! I added the " " 's but it still is messed up

    • @angrygeri7026
      @angrygeri7026 3 ปีที่แล้ว

      @@buckieblu Since yesterday I figured it out and actually created a nice little system!
      I can link it if you want.

  • @pugletanimations5785
    @pugletanimations5785 2 ปีที่แล้ว

    is it possible to add sound for each time you press space?

  • @Raven_Productions
    @Raven_Productions 4 หลายเดือนก่อน

    I can't find the variables in the inspector, anyone know what I may have done wrong?

    • @Raven_Productions
      @Raven_Productions 4 หลายเดือนก่อน

      Nevermind, I just forgot to add some semicolons!

  • @itsME-dc4vm
    @itsME-dc4vm 3 ปีที่แล้ว +1

    Nice ;D

  • @CodeOverloaded
    @CodeOverloaded 3 ปีที่แล้ว +1

    I am a game developer using Unreal engine

  • @koil_koil
    @koil_koil 2 ปีที่แล้ว

    I’ve written the code exactly how it says, but I still get an error that says “the name Sentences does not exist in the current context. I’m not sure what to fix.

    • @ZygerGFX
      @ZygerGFX  2 ปีที่แล้ว

      join my discord and message in the "Help" channel I'll see if I cna help

  • @holowichigo1
    @holowichigo1 3 ปีที่แล้ว

    Great video :) I would like to ask that, at the start you already had a dialog imported. How did you get that? sorry I know it's silly just want to get this right :)

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว

      Do you mean the images ??

  • @buddiosgaming8541
    @buddiosgaming8541 3 ปีที่แล้ว

    Did you see the snydercut?

  • @shubhamvernekar7701
    @shubhamvernekar7701 3 ปีที่แล้ว

    Why are you not streaming on twitch?

  • @macaaris1018
    @macaaris1018 3 ปีที่แล้ว +1

    👍

  • @Delgas01
    @Delgas01 3 ปีที่แล้ว

    When I press the key the text wont appear :(

    • @ZygerGFX
      @ZygerGFX  3 ปีที่แล้ว +1

      check your inputs in unity and if they are set up correctly. and ensure the bit of code has no errors or anything. if the problem persists message me on discord and ill try help you with the issue. Zyger#3045

    • @Delgas01
      @Delgas01 3 ปีที่แล้ว

      @@ZygerGFX Wow so nice of you, thanks! I will check the input, thank you again

  • @mridhul.a4824
    @mridhul.a4824 3 ปีที่แล้ว

    Plz plz help me do a car game plz 😭 maybe like Dani plz I am a beginner soo plz