You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect that the state is not being reflected on the Canvas because TMP_Text.UpdateVertexData
has not been called after modifying the vertex data of each mesh.
After testing with the following simple implementation, it was confirmed that the presence or absence of UpdateVertexData affects the behavior.
vartextInfo=text.textInfo;for(inti=0;i<textInfo.characterCount;i++){varcharInfo=textInfo.characterInfo[i];if(!charInfo.isVisible)continue;varmaterialIndex=charInfo.materialReferenceIndex;varvertexIndex=charInfo.vertexIndex;varcolors=textInfo.meshInfo[materialIndex].colors32;varcharColor=Color.red;for(intn=0;n<4;n++){colors[vertexIndex+n]=charColor;}}for(inti=0;i<textInfo.materialCount;i++){if(textInfo.meshInfo[i].mesh==null)continue;textInfo.meshInfo[i].mesh.colors32=textInfo.meshInfo[i].colors32;textInfo.meshInfo[i].mesh.vertices=textInfo.meshInfo[i].vertices;text.UpdateGeometry(textInfo.meshInfo[i].mesh,i);}text.UpdateVertexData();// If this line is missing, it will be fixed to red regardless of the content of text.color.
The text was updated successfully, but these errors were encountered:
https://github.com/AnnulusGames/LitMotion/blob/f7df4966aa30482fb739148aba2bc7bc672dfaf6/src/LitMotion/Assets/LitMotion/Runtime/Extensions/TextMeshPro/TextMeshProMotionAnimator.cs#L284-L290
I suspect that the state is not being reflected on the Canvas because
TMP_Text.UpdateVertexData
has not been called after modifying the vertex data of each mesh.
After testing with the following simple implementation, it was confirmed that the presence or absence of UpdateVertexData affects the behavior.
The text was updated successfully, but these errors were encountered: