Forum rules - please read before posting.

Rich Text Tags problem

edited September 2024 in Technical Q&A

I'm getting this error when placing rich text tags in my speech dialogue: https://imgur.com/8uh1hGR

I'm trying to place two tags that change to color of two different words, the first one shows up normally but when the text scrolls to the second, the text disappears entirely and the error shows.

I'm using the latest AC version
Unity version 2022.3.26f1

Comments

  • I've watched many of your youtube videos, and they've been really helpful. :)

  • What's the exact text of the dialogue speech? I'll attempt a recreation.

    I'll also need to see the properties of the Label element that displays it, and the Speech Manager's "Subtitle" panel.

  • edited September 2024

    Line text: [expression:FrownA]Good thing I have this <color=lightblue>Mind Stone</color> with me. I can use it to make the guards forget they ever saw me... I can't use it too many times though, my <color=lightblue>willpower</color> has its limits.

    Subtitle panel: https://imgur.com/Wn5x67g

    Label element: https://imgur.com/mdbkEZY

    (image embedding doesn't seem to work for me atm)

    It seems rather odd, I can have only one color tag with 6 letters or more in a single line of dialogue, if I add another it breaks. Any color with 5 or less letters works in any combination. The same error pops up when I edit the placeholder text in the menu manager.

  • edited September 2024

    [expression:FrownA]Good thing I have this <color=lightblue>Mind Stone with me. I can use it to make the guards forget they ever saw me... I can't use it too many times though, my <color=lightblue>willpower has its limits.

    Is the forum removing the closing tag, or is there no closing color tag in the text?

  • Oh yeah that looks like a forum thing

  • I also noticed that the text with different color doesn't fade out with the rest of the menu.

  • I can't recreate such behaviour - though I suspect this issue is tied with the Label element's Text effect setting.

    This issue may not occur if you either set this to None, or switch the Menu's Source to rely on Unity UI.

    Does this occur for all dialogue with tags, or just the one mentioned? If you can create a simple test scene that demonstrates the issue (i.e. an otherwise empty scene with the problematic speech in an OnStart cutscene), PM it to me, along with your Managers, and I'll take a look.

  • You're right, the issue doesn't occur when the text effect is set to none. The issue affects any dialogue. I'm able to recreate this behavior in an empty project when just adding the text effect.

  • Recreated, thanks for the files.

    To fix, open up AC's AdvGame script and replace the line (around 1897):

    while (i < text.Length && text.IndexOf ("<color=", i) >= 0)
    

    with:

    while (i < effectText.Length && effectText.IndexOf ("<color=", i) >= 0)
    
  • Can confirm that this fix works, thanks!

  • I also noticed that the text with different color doesn't fade out with the rest of the menu.

    This seems to be a problem for me still with Unity version 2022.3.56f1 and AC v.1.82.4

  • The fix above is included in the latest release. Is this to say that the effects of it are no longer working?

    It's been a while since this post began - could you share updated images of the setup/issue occuring?

  • I set the fade to 1 second to better show the issue. The problem's not there for me if I use Unity 6. I believe the settings for the dialogue box and settings are the same as before.

  • Recreated, thanks for your patience.

    It does look like an issue with Unity itself - one that they've indeed fixed in Unity 6. I'd say it's a case of either switching Unity version, or relying on Unity UI for the Menu's Source - something I'd recommend in general.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.