DialogUI and rich text formatting

NodeCanvas Forums Support DialogUI and rich text formatting

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12012
    jun
    Participant

    Hi ! We’ve just purchased the nodeCanvas plugin for a visual novel game, and we’re really happy about it. I’m having though some problems with diaplying dialogs and the rich text formatting. I have a dialog like this :
    <i>Hello player</i>
    Thing is, when displaying this text, one character at a time, it first displays the <i> tag, the text and the closure tag. Then it transforms the text in italics. Same goes with <b> tag.
    It’s quite annoying and apparently a common behaviour of dialogs with rich texts.
    I tried some solutions like that one, which consists in adding a formatting tag between EACH CHARACTER of the sentence (not a big fan…) : http://answers.unity3d.com/questions/1148019/print-text-one-character-at-a-time-with-rich-text-1.html
    Plus it only works when you’re having only one tag. Children tags like that => <i><b>Hello there</b></i> doesn’t work with this solution.
    Other solution found online will probably need for me to change the plugin code of nodeCanvas (the DialogUGUI.cs) and I would very much like to avoid that.

    I do realize it’s not a behaviour caused by nodeCanvas, but some help would be nice for that, thank you very much \o

    #12026
    Gavalakis
    Keymaster

    Hey,

    First of all, thanks for your positive feedback 🙂
    Indeed this is something I haven’t much accounted for to be honest.

    Regarding the task at hand, I just spend some time coming up with something to provide you, but it wasn’t solid and quite hacky. For example it wasn’t accounting for space between brackets (eg < b>), neither multiple formats (eg <b><i>Hello</i></b>) and overly bad, so I dropped it 🙂
    I will definitely look at implementing this solidly though within the existing DialogueUGUI soon after the new version is released which is around the corner. As soon as I have something good running, I will also let you know in this thread too (so that you don’t have to wait for the release which will include this).

    Just to clarify about the DialogueUGUI, you can actually make a copy of the script and the prefab (renamed to something like MyDialogueGUI) and basically create your own GUI prefab and functionality by using the existing one as the base template. You will then just have to add your prefab in the scene for it work and will not worry about later updating to a new NodeCanvas version, messing up your GUI :).
    So if doing this is something that will help you move forward faster, by all means it’s possible.

    If you do decide to do that and need any help, by all means do let me know!
    Thank you!

    Join us on Discord: https://discord.gg/97q2Rjh

    #12045
    jun
    Participant

    Hi ! Thank you for the answer. You’re right I can do my own DialogUI, hoping I can come out with a suitable solution.
    Also looking forward for the next update of nodeCanvas !

    #12052
    Gavalakis
    Keymaster

    Thanks as well!
    Don’t hesitate to let me know if you need any help with implementing custom DialogueGUI! 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.