Forum rules - please read before posting.

A question about Text Animator Plugin

Hey Chris,
I'm considering improving the text in my game by implementing the popular "Text Animator Plugin". Is this plugin compatible with AC?

Thanks!

Comments

  • Indirectly. Text Animator relies on Text Mesh Pro UGUI components to work, which AC does support.

    In most cases, for static text boxes e.g Pause menus etc, this should be enough:

    https://docs.febucci.com/text-animator-unity/welcome/quick-start

    When using Text Mesh Pro in a Unity UI-based Menu, check Use TMPro components? in the Menu's properties to make use of them.

    For dynamic elements, such as speech text, you may need a custom script to have the speech be updated from AC directly. This will vary based on your situation, but a couple of samples can be found in this discussion:

    https://adventurecreator.org/forum/discussion/13732/

  • BikBik
    edited July 29

    Yes, I need it for dynamic elements, such as speech text. I followed your script example in the above discussion but I keep getting an error.

    1) I used this script https://prnt.sc/37VF2VTZiJYo and attached it to the UI prefab
    Error: Assets/jd/Scripts/TextAnimator.cs(7,23): error CS0234: The type or namespace name 'TextAnimator' does not exist in the namespace 'Febucci.UI' (are you missing an assembly reference?)

    2) I tried the other script https://prnt.sc/wzMDMs4-dlto and didn't get any error, however, when adding effects like "shake" the whole line will disappear https://prnt.sc/Hb7nsAPg6ltT

    https://prnt.sc/rfFm5p2bEweW

    Any idea what's going on?

  • Use the first script but replace Febucci.UI.TextAnimator with Febucci.UI.TextAnimator_TMP.

  • Thank you, Chris. That fixed the error. However, when adding effect to text the whole dialogue will disappear https://prnt.sc/iJuulzV1XANm

    https://prnt.sc/Hb7nsAPg6ltT

    It works fine with Unity Canvas text but not with Adventure Creator dialogue.

    1. If you pause the game while this occurs, and select the Text Animator component in the scene, what text is shown in its Inspector?
    2. Does it display if you remove the tags / expression tokens from the speech text?
  • BikBik
    edited July 30
    1. It shows this: https://prnt.sc/IalItFfByoDT
      https://prnt.sc/u0ryV0VESds2
      https://prnt.sc/8SVYKbiVVBpL
      https://prnt.sc/-ktCQfc-h9Lb

    2. No. Removing the tags / expression tokens doesn't fix the issue.

  • Are you using speech-scrolling? If so, what is the effect of disabling that feature?

    If you're speech-scrolling, you'll likely need the second script in that thread. Bear in mind, however, that you'll need to detach the Text object from AC's Speech Manager so that only the script is affecting it.

  • BikBik
    edited July 31

    Yes, I'm using speech-scrolling, however, using the 2nd script or just remove the scrolling function from AC doesn't solve the issue.

    When you say "detach the Text object from AC's Speech Manager" are you referring to this one https://prnt.sc/e0IcGbrF-8nZ ? If yes, then I can't remove it. It always shows the Text object.

    My prefab: https://prnt.sc/9ZZP5drUOyrh

  • If that's the same object you're affecting with the script, yes.

    You can clear it by deleting the Line Element itself in the Menu Manager, or by just removing the Constant ID component from the GameObject - it's this that creates the link with AC.

  • Unfortunately, I did all the above but it still doesn't work.
    1) I deleted the line Element in the Menu Manager = same issue
    2) Removed the Constant ID component = Same issue
    3) Removed the line element and Constant ID component = same issue

  • Can you PM me your Managers, Subtitles UI prefab and script?

  • Sure

  • Thanks for the files. I've updated the script and provided a guide for it on the AC wiki:

    https://adventure-creator.fandom.com/wiki/Text_Animator_speech

  • Thank you, Chris. I can confirm that the above guide worked perfectly. https://prnt.sc/O7AtLXRyB5yj

    However, the new approach has created two new dialogue-related issues:
    1) All dialogue expression tokens are now visible in the dialogue. [expression:normal_v1] etc
    2) It seems that the number of characters is limited, with most dialogues showing only half of the text.

    https://prnt.sc/c17kQwaL4wnr
    https://prnt.sc/z_i2Gd50n5Co
    https://prnt.sc/Hb6qz-tomOsz

  • P.S. If I don't use dialogue expression tokens isuue 2. will be removed

  • I've updated the script, try it now.

  • Thank you, Chris. The new script worked 100%

  • Hey Chris,
    The animated tags like , , , and are working fine.

    But I’ve run into an issue — tags like , <color=red>, and don’t seem to do anything.

    It looks like the animation stuff works, but styling tags like bolding, fading, or changing color just get ignored.

    Is this a limitation with Adventure Creator's integration, or is there something I need to tweak in the script to make those tags work too?

  • edited August 6

    It's a conflict with AC's tag-processing. You can prevent it, however, by clearing the "Rich Text Tags" array in the Dialog component of the scene's GameEngine object.

  • BikBik
    edited August 6

    Thank you, Chris. It worked. I've also informed the creator of Text Animator about the new AC script.

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.