![]() ![]() ![]() For me, I will consider adding this feature to the BetterTextMeshProUGUI component since I already derive from it. ![]() So, if you now start to make a derivation of TextMeshPro and want to use Better UI but also want to share it with people who don't use Better UI, you need to make two versions of it.įor you, I would suggest to implement it as a separate component which requires the TextMeshPro component. But it also has a downside: If somebody else uses a derivation of one of these "normal" components he cannot use better ui or change the base class to the "Better" class pendant. Also, I just can replace the normal component and relink any references to the better component without problem. This opens up a lot of possibilities: I could actually modify the internal logic of the class to a degree which wouldn't be possible to do from outside. įor Better UI I made a decision with a huge impact: I derived my "Better" components from the normal UGUI / TextMesh Pro components. Let me know if you understood my specific case, if you are interested, I can provide the script in question to make it more clear. This is not hard to do, but I would prefer to avoid it. Font Size is the point size of font to generate Font Asset’s Texture. Font Sourc e is the font asset (tff, otf format ) which is used to generate the TextMesh Pro Font Asset. If I go the way you suggested, then I have to parse the cloned elements one extra time to get the text components and add them to the list of the "Text Group". The TextMesh Pro font creation window can be opened in the editor via Window / TextMeshPro Font Asset Creator. This work perfectly with the ToggleGroup approach, each Text component has a field for the TextGroup, and will keep the same reference when it's duplicated, so no extra work is necessary. This ElementCloner class would take a template and duplicate it dynamically and provide a list of the cloned elements that can be easily parsed and individually customized. Say you have a list of toggles or a list of level buttons in a scrollable list. ![]() This script is responsible to dynamically clone a template (either a prefab or an existing ui element) to a specified number of times, and manage the cloned elements. The only reason I wanted to work in a similar way as the ToggleGroup is that I wanted for this to be compatible with one of my own UI scripts. It has the advantage of being easy to implement and not having to change the TextMeshPro class. I also find some issues with the World Space canvas, the yellow bar should present a name above it, just like the grey bar on it's side.Yes that would be an easy method to implement it, and it was this way in the link I provided. While for all the UI I'm using Alata-Regular-Outline 50 SDF UIĪn just as a final effort, I've added an extra font for the oddest issue,Alata-Regular-Outline 54 SDF UI, here on the screenshot I've two TextMeshProUGUI selected with the same settings: (PS all the text on this screen is using this same font asset, and the icons will change randomly)Īnd this is how it shows on the final build I'll post some screenshots to explain it better:įor all my TextMeshPro on my World Canvas I'm using the font Alata-Regular-Outline 40 SDF World Canvas I know this mistake is constantly reported and most of the times it has to do with using TextMeshProUGUI and TextMeshPro together, I've read some posts about this same issue, but I'm not using the same materials and I'm having some odd problems, some of the TextMeshPro and some of the TextMeshProUGUI won't show, not all of one or all of the other. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |