snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.63k stars 290 forks source link

SayDialog Typing Animation starts at wrong Position when using TMP #954

Closed Tintifax69 closed 3 years ago

Tintifax69 commented 3 years ago

Describe the bug When using a custom SayDialog that uses a TextMeshPro - Text (UI) the Typing Animation starts with the text already half/comletely finished. Meaning a portion of the Text or the whole Text is already there and the Typing Animation only finishes the rest of the Text. This only seems to happen when the Say Command is called after a Menu Command. However it does not have to be called directly by the Menu Command. When using two Say Commands in succession the second one will always properly start at the beginning of the text.

To Reproduce

  1. Create a custom SayDialog that uses a TMP text component instead of the standard unity text component.
  2. Create a Flowchart with a Say Command that uses the custom SayDialog.
  3. Call the Block with the Say Command via a Menu Command repeatedly (does not always happen on first time)

Expected behavior The Typing Animation in a SayDialog should always start with an empty Text component

Versions & Platform (please complete the following information):

breadnone commented 3 years ago

@Tintifax69 I made a pr related to this issue https://github.com/snozbot/fungus/pull/952.

Edit: Though it would not solve the auto completion when clicking Buttons/menu choices... it solved the other glaring issue as mentioned below. Edit 2: Apparently the pr above actually fixed the issue with menu choices on my end.

The other way to trigger it, is when ClickAnywhere is selected and user clicks at the end of Say, the next Say would be auto completed.

TheEmbracedOne commented 3 years ago

This is also related to #910 - see that post for some gif demonstrations and my reproduction @stevehalliwell

I'll try the pr by @breadnone (thank you!) and report back whether if tixed the issue on my end too!

Edit: I tried the PR but unfortunately it didnt fix my issue. Please have a look here for results: https://github.com/snozbot/fungus/issues/910#issuecomment-808810298

stevehalliwell commented 3 years ago

Potentially a duplicate of #910

stevehalliwell commented 3 years ago

985 reportedly does solve #910, moving forward and assuming the same is true here. Please feel free to reopn the issue if that turns out not to be the case.