- Home /
How hard is to replace UI Text with Text Mesh Pro?
How hard it is? Are any code changes necessary? Since TMP became free I've considered replacing current stuff that uses UI text with it, but since some of the code that uses UI Text was written by someone else (Fungus team, to be precise - even if they use TMP in newest versions I can't update because I had to do few customizations necessary to make it do what I want and as such I'm stuck on old version) and the old coding adage saying "there are two types of code: one that you understand and one written by someone else" I really need to know how hard it is to replace it.
TL;DR: How hard it is to replace UI Text with Text Mesh Pro and what steps are necessary to do so?
Answer by IgorAherne · Mar 17, 2017 at 11:35 PM
I did just that a week ago. Took me one full day to change the whole Main menu + ingame-menu with several pages of content.
Just make sure to include using TMPro;
and instead of Text
use TextMeshProUGUI
on a 2D text. Anything else is same, including variable names
Make sure you've spent two hours and watched tutorials about them to generate atlas, familiar with material presets and you are good to go
You would not believe how hard I've had to look to find that answer. Thank you!!
Answer by m0guz · Mar 18, 2017 at 12:15 AM
As @IgorAherne said, most of the thing is same. Only addition to process is to generate atlas which is very easy (TextMesh Pro - Font Asset Creator (in depth)).
But I would wait Unity release for native implementation.
Yeah, can't really wait for that, demo is almost ready and probably it would break preexisting text components anyway/be like when Shuriken "replaced" legacy particles (both systems coexisting) and I'd have to do what @IgorAherne said anyway.