I am pretty sure many people are not aware of the issue and never seen this post either.Ĭlick to expand.Assigning the font asset to the font property alone would result in the default material being assigned to the text object as well. Hint create a new material preset for TextMeshProUGUI component and assign that preset to the component") would make things easier. Throwing a compile error ("Error : You are not allowed to use the same material you used in TextMeshPro component in a TextMeshProUGUI component. Which brings me to my point maybe we should not be allowed to use the same material preset for both component types. All TextMeshProUGUI components that did not share a material preset with worked 100% of the time on those devices.Īfter using different material presets for each component type, as far as we know, the problem went away. If a TextMeshProUGUI component had a material that is also used by a TextMeshPro, the text on the TextMeshProUGUI component was sometimes not rendered on iOS devices. In our case, as wrote earlier, we had and sharing materials. Thanks Stephan! I would've never figured out that on my own. Cause the whole award thing didn't display, and it's made up of both an image and TextMeshProUGUI elements, so I don't think it's just a material clash problem. That seems to have fixed the disappearing TextMeshProUGUI objects, but I see at the end of my game one of those little award displays didn't appear when I'm pretty sure it should have. I gave that TextMeshPro a different material than the TextMeshProUGUI elements (went to the gears icon for the material and selected "Create Material Preset" and then switched the material used by the object to that new one). Turned out I did have a TextMeshPro element also in the scene with the TextMeshProUGUI objects and they were using the same material. They were fine in the Editor, but playing on my phone the current points and game timer would disappear after like 30-40 seconds, and the award displays (made up of image and text components) would usually not appear at all when they were supposed to. I was having this issue too my current points and game timer, both TextMeshProUGUI elements, and a couple little award displays in a dialog box were all not showing up right. So please submit bug reports with repro projects as this would be most useful. Since animating / scaling of the text object can be implemented in many ways, it is beneficial for me to get reproduction cases to allow to see if an alternative / better implementation might be possible. TMP does check every frame if the scale of the text object has changed before the frame is rendered but it is possible for users to change the scale after this check. It is frequent for users who animate the scale of the text object to potentially end up with an incorrect SDF Scale as the text component is unaware of such scale changes. It can result in non visible text but mostly the latter. This scale is used to compute the SDF Scale which is the relationship between the final scale of the text object and the scale of the glyphs in the atlas texture.Īn incorrect SDF Scale will result in either fuzzy or overly sharp text or white blocks of text. Definitely not related to graphic settings or anything of that sort.Ĭlick to expand.In order for the text to render correctly, the scale of the text object must be uniform (X, Y, Z). It's literally A/B testable, if I try to switch the TMPs back to the same material I use for TMP-UI, then the UI text disappears, and if I switch it to the duped material, the UI text reappears. Maybe comment #12 is a different workaround, possibly this only affects screen-space canvases. Duplicating the materials and using different ones for the worldspace text, as per suggestions several posts up, solved the problem. The effect is pretty strange saving the scene would make the text reappear briefly, but as soon as I made any changes or tried to run the game, it would disappear again. I'd been using both TMP and TMPUGUI for a while, but I forgot to update the TMPs to the new font I was using as soon as I did that, the UI text disappeared! This bug is apparently still around I just experienced it in a scene in which I have a UI (Screen Space Overlay) and also some world-space text overlays with the main camera.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |