Hi everyone,
I’m having an issue with the Text Mesh Pro (TMP) asset from the Asset Store. I want to switch all my Text components to TMP, the code I wrote for this works fine, but whenever I turn an inactive object to active my TMP alignment gets reset to Top Left (both in-game and in the Unity Editor). Every other component stays exactly as it was including everything on the TMP component.
Solutions I’ve tried that made no difference:
-I updated to the latest version of TMP and Unity.
-Creating whole new Game Objects and add each component to the new object and delete the old one.
-Setting every object active before I switch the component then turning it inactive again once this is done.
-I have tried this in an empty scene with just 1 TMP component inactive and not a single other script in the entire scene. Which still resulted in the same problem.
What does work however but is an impossible solution (we have over 9000 text components in the game):
-Changing the text component to TMP, setting the object active so the alignment resets, adjust the alignment manually, turn object inactive again.
I need to be able to have the alignment stay correct even if the object is inactive at the start of the game as I don’t want every text to be shown instantly. I’ve been unable to find anything related online which is odd because I’d think many people would notice this issue.
If you’d like more information just let me know.
Any help would be greatly appreciated.
Thank you!