[Studio] Aligning UI Text

Hi there, this might be a potential case of me missing something obvious, but I was wondering how I’d go about center-aligning a text UI element in Studio? I have a button that I’d like to add a label to, but the text only seems to be left-aligned with no way to change it. I tried the alignment fields in the inspector, all set to Center, but none of them seem to change the text’s alignment. Sorry if this is a bit of a basic question, but I’m hoping it might be!

2 Likes

Centre-align the text inside your UI button. To achieve this, make sure in the inspector, under Text Alignment, it’s set to both horizontal and vertical alignment being “Center”. Check also the parent container of your button that its alignment won’t override the text and check if the size and position constraints of the text element have a size equal to your button dimensions.

1 Like