While making a game with Unity, I was curious about the difference between TMP_Text and TextMeshProUGUI in TMPro. Please let me know what is different from each other. I'd appreciate an example of when to use it.
I don't know why TMP_Text and TextMeshProUGUI are separated and used separately in Unity.
TMP_Textis the base/parent class for two typesTextMeshProUGUI- replacing the now legacyUI.Textwithin aUI.CanvasTextMeshPro- replacing the now legacyTextMeshfor placing 3D text without using aUI.CanvasThis second one is where the name of the entire package originally comes from. It was a custom improved
TextMeshuntil Unity adopted it into the core.So if you want to be more generic (loosely coupled) and make your component work in theory with whatever will be used for displaying that text later you use
TMP_Textso both can be used the same way.