🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

[solved] Text alignment like Zelda BoTW / Mario Odyssey

A topic by mrtenda created Oct 29, 2017 Views: 94 Replies: 2
Viewing posts 1 to 3
(Edited 3 times)

First of all, thank you for creating this amazing package! I've been finding it immensely useful so far!

So in the game I'm working on, I would like to align text in Super Text Mesh by both left-justifying it and centering it, like Zelda BoTW and Mario Odyssey do. Basically what these games seem to do is figure out what the total width of the text is going to be when it's left-justified, and then center it on the screen (and I am guessing that these games don't use auto-wrapping in order to make this all possible?). Here are some examples from Zelda that should explain what I mean:

(Here's also a video link: https://youtube.com/watch?v=CE8PS7r3IGM&t=7m59s )

I would like to imitate this behavior with Super Text Mesh, but I couldn't figure out how to do so from reading the documentation or experimenting with the alignment settings. Do you have any ideas? Thank you!


Hey! Good eye, never noticed this in specific.

Those variable wrap distances have gotta be put in manually, I think...? It's gotta just be manual line breaks I think. I can think of a way to do it automatically, but not a way to do it automatically and get good results every time.

If you're cool with manual line breaks, you can just set Super Text Mesh's anchor to be "Middle Center" (if you're using UI text, just align it "middle"), and then set the alignment to "left"? If autowrap is off (or on!) that should deliver the right result?

Also while testing this I realized that line breaks are acting pretty weird for middle-anchored text, so I'll be working to fix that shortly, sorry about that!

Amazing, that worked!! Once I applied the settings you suggested, and turned off auto-wrap, it all started working like I wanted it to. Thank you so much!