Forum rules - please read before posting.

Ignore Super Text Mesh tokens in Display Time Factor

Hi!
I'm using Super Text Mesh in my game.
It all works fine except i have noticed that the tokens used to edit the style of text seems to be included when calculating the time display factor. It's not an issue if im only doing one little effect but some lines stay on screen for way too long.
Something like this stays on screen for way too long:
Wow. She's<w><c=#ed26b1> super dooper</c></w> wrinkley.

Is there a way to ignore anything contained in the <> symbols, when deciding on the display time?
Thanks!

Comments

  • In the GameEngine object that AC places in the scene Hierarchy, look for the Dialog component's Rich Text Tags array. This is a set of tags that AC will strip from your speech text when formatting it for display/timing.

    If a tag has a parameter (such as "c" in your example), you need to let AC know by adding an equals sign to the end of it - see the "size" and "color" examples already present in the list.

  • Thanks Chris! Adding the tags did change the display time.
    Unfortunately, it also removed the text effect from the subtitles.
    I also tested some of Unity's own Rich Text tags and they also don't appear. I'm guessing the problem is on Super Text Mesh's side or perhaps the script used to implement it.

  • I think the link you're trying to share wasn't set correctly - can you paste the URL directly?

  • To display the original text, not the one with tags removed, replace:

    supertext.Text = speech.log.fullText;
    

    with:

    supertext.Text = speech.log.textWithRichTextTags
    
  • Thanks Chris!
    That worked perfectly. Can't believe how simple the solution was, hopefully anyone else who runs into this will find this thread.

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.