Browse Source

Add ForceMeshUpdate to TextAdapter

Ensures subsequent calls to tmpro related elements, such as revealed characters, are not stale.
master
Steve Halliwell 3 years ago
parent
commit
c6c68eedde
  1. 1
      Assets/Fungus/Docs/CHANGELOG.txt
  2. 1
      Assets/Fungus/Scripts/Utils/TextAdapter.cs
  3. 1663
      Assets/Tests/TMPSayAndMenuPartialClearBug.unity
  4. 7
      Assets/Tests/TMPSayAndMenuPartialClearBug.unity.meta

1
Assets/Fungus/Docs/CHANGELOG.txt

@ -8,6 +8,7 @@ Unreleased
- Fix double duplication of blocks in flowchart window. Thanks to ongjinwen. - Fix double duplication of blocks in flowchart window. Thanks to ongjinwen.
- Dialog ClickAnywhere not supports ignore click delay. Thanks to breadnone. - Dialog ClickAnywhere not supports ignore click delay. Thanks to breadnone.
- SetNextLineFlag only flags if Dialog is actually active/writing. Thanks to breadnone. - SetNextLineFlag only flags if Dialog is actually active/writing. Thanks to breadnone.
- TextAdapter with TMPro, now forces mesh update on text change. Fixes cases where a Say/Writer would expect RevealedCharacters to be current but would be previous frame stale value.
## Changed ## Changed
- Block will LogError when an exception is caught from a Command being Executed. - Block will LogError when an exception is caught from a Command being Executed.

1
Assets/Fungus/Scripts/Utils/TextAdapter.cs

@ -320,6 +320,7 @@ namespace Fungus
else if (tmpro != null) else if (tmpro != null)
{ {
tmpro.text = value; tmpro.text = value;
tmpro.ForceMeshUpdate();
} }
#endif #endif
else if (textProperty != null) else if (textProperty != null)

1663
Assets/Tests/TMPSayAndMenuPartialClearBug.unity

File diff suppressed because it is too large Load Diff

7
Assets/Tests/TMPSayAndMenuPartialClearBug.unity.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 652bef697ccd15d46893310449e88ce6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save