CurvedTextMeshPro icon indicating copy to clipboard operation
CurvedTextMeshPro copied to clipboard

Use LateUpdate instead of Update

Open SXtheOne opened this issue 2 years ago • 1 comments

Hi,

Just a note. I had problems when doing mechanim animation. The TMPro_Text was disabled and got enabled around the middle of the animation. Also, I constantly rotated the text throughout the animation (even when it was disabled). So, the problem was that I saw the unmodified text for the first frame when it got enabled. It was OK (curved and in a good position) from the next frame. In your script, the curve modification is done in the Update method but I think it would be in a better place in the LateUpdate. I changed only this and the problematic frame disappeared most probably because the Curved script modifications were executed last.

Cheers,

SXtheOne avatar Oct 07 '22 19:10 SXtheOne

You're a lifesaver!! My text on a circle would break whenever I changed the opacity with DOTween, causing it to render in the usual straight line for at least a single frame. (If I was animating from, say, transparent to fully visible, it would render in a straight line for the entire duration of the animation.) Changing TextProOnACurve's Update to LateUpdate made this problem disappear.

@TonyViT If you ever get around to it, this would be a great change. Regardless, this plugin has been a gem :)

3k3m1n1 avatar Oct 18 '23 16:10 3k3m1n1