I am on Unity 2018.4.14f1, and am on latest STM (v1.9.2).
When toggling the active state on some gameobjects using UI STMs that are set to the same font & not auto-read, I occasionally see something like this:
The second button is supposed to say "OPTIONS" here. I can repro it 100% of the time by opening this menu, closing it, opening a different menu with some similar STMs, closing that, and then opening the original menu again. The options text is always the one corrupted here, and in the other menu the text "-- Start --" is corrupted on opening that menu again a second time. Both menus are inactive on start. So, this seems related to OnEnable being called after the mesh has already been built once.
I have confirmed Rebuild() is being called on it when enabled. When I mouse over the button my code triggers a Rebuild that corrects the mesh.
Adding a call to WaitFrameThenRebuild in SuperTextMesh.OnEnable seems to fix the problem, but having to call Rebuild twice is not ideal for performance: https://pastebin.com/QimMki3u
If I call WaitFrameThenRebuild instead of Rebuild, rather than calling both as in my paste, only the first character on the options string is corrupted, and the rest are fine.
Any idea on this? Worst case I can keep my workaround in place, but I would love to be able to remove a second Rebuild call as it can be pretty costly.
Thanks!