Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

[Solved] Aligning text

A topic by pesaru created Sep 09, 2018 Views: 506 Replies: 3
Viewing posts 1 to 2

I've had no issue vertical aligning text. However, center or right aligning, while simple to do when a Super Text 3D object is created (a non-UI object), when I create an object as a UI object on a canvas, I haven't been able to get it to align (but only center/right, vertical align works fine). I wanted to ask if anyone else could replicate this issue before I spend another hour trying to troubleshoot what I'm doing wrong personally. Thanks!

Developer

Hey!

It sounds like you're trying to instantiate an object with Super Text Mesh on it to a UI canvas, and you want the text to be center/right aligned, is that correct?

Please make sure you have "Ui Wrap" checked under the "position" settings. Hopefully that's the cause, it seems to match your description. In v1.7, this checkbox was essentially on by default, but led to some edge cases with how STM worked before I added compatibility with the content size fitter component. So in v1.8, I kept the new feature in as a boolean and had it turned off by default. I guess I should switch that to be on my default instead of off since that would match what most users expect, and wouldn't effect older users.

I feel stupid, thanks Kai. I honestly could have sworn I tried every single option--apparently not. Again, thanks for the help!

I hope this doesn't bump this up to the top, but I totally had to Google this answer because I forgot how to solve this. Thank goodness I found it :-P