Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thanks, I really appreciate all the thought and detailed examples, but this is a UI feature I see in games like MTG: Arena, and it is supported by TextMeshPro. Unfortunately I will probably need to stick to TMP for this particular type of text, at least until I think of another solution or work out some manual math to figure this out (perhaps using the content size fitter approach and checking the bounding box size).

My game also has dynamic rule text that can be changed by player modifications. While I do have a character limit on how big a card can get, for readability reasons, it's not really practical to assess based on the longest "printed" preset card.

Additionally, I once used the method you suggested where I just sized the text to the biggest practical size. In working on Steam Deck compatibility, I found that on handhelds, this text size was too small and required the player to hit the "view enlarged" button on every card to understand what was happening, hence how I ended up with a larger font size for cards that can fit it. What's "readable" differs greatly from device to device, unfortunately.

Also, unfortunately, the cards are in 3D world space, so a scroll rect is probably not great for me unless I create the UX for it manually by binding to mouse scroll events. And the vertical "marquee" effect I've seen in other games, and it has some disadvantages imo in terms of readability (the player might not be ready for the text to scroll, etc.).

Regardless, thank you very much for the thoughtful responses!

Oh, I see! I suppose since an arbitrary amount of text *does* need to be added to this space to fit the game's design, that is a good reason for this feature to exist... I'll add fixing up the "multiline" best fit mode back to my to-do list! The current implementation *works* but I'm just not satisfied with it. But since text will still get too small for where it's needed, I'm not sure it's the complete solution for this...


Hmm, if you're having text that's too small on a lot of cards, maybe they could automatically zoom in on hover instead of when pressing "view enlarged"? Or display the effect text enlarged somewhere else on screen? That way, there's no automatic scrolling that might happen at a bad time... I do want to add this best fit option as a feature to be clear, but I'm always thinking of stuff from a UX perspective.


Finally, Super Text Mesh *should* be compatible with SpriteMasks, so that will work outside of Unity UI as a manual type of scroll rect. (And you can have a world space canvas as well!)

Thank you! I suppose "popping out" an enlarged version of the text that uses STM features to show what's changed would be a pretty decent solution for now! I will probably hold off on making that animation, but it could enhance the current functionality anyway, so it's a pretty good idea. Thank you again for all the help!