fungus icon indicating copy to clipboard operation
fungus copied to clipboard

"Write Whole Words" is ignored in TextMeshPro say dialogues

Open DancingEngie opened this issue 2 years ago • 0 comments

Describe the bug "Write Whole Words" setting is either ignored or bugged when using TMP in Say dialogues. The setting works perfectly when using Unity's default Text objects,

To Reproduce

  1. Open a TMP demo scene, or alternatively create a new scene, spawn a custom Say dialogue, and configure it to use TMP
  2. Enable "Write Whole Words"
  3. Use a dialogue node of some kind to trigger the new say dialogue
  4. Play
  5. See error/undesired behaviour

Expected behavior Sentences should be written out one word at a time. Instead, they are written out one letter at a time, as if the setting is disabled.

Screenshots https://i.imgur.com/WZMeIcz.gif (Option is enabled in the editor. Text size increased for better visibility)

Versions & Platform (please complete the following information):

  • Unity version 2020.3.23f1
  • Fungus Version v3.13.8
  • Editor OS: Windows 10
  • Build Platform Windows

Additional Context By placing Debug.Log callouts in every step of the PartitionString function (Writer.cs), I managed to figure out that Fungus doesn't even append rightString when using TMPro, instead opting to end the function after appending leftString. Fungus goes through the entire function normally when Unity's default UI Text component. I'm not proficient enough with Fungus' backend to understand if that helps at all, but it did strike me as odd nonetheless.

DancingEngie avatar Jun 19 '22 02:06 DancingEngie