Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by nyonge · Apr 21, 2015 at 06:51 PM · uitextalignmentcentered

UI Text Not being centered

My UI text (newest Unity, 5.01f1) has some problems with the UI text not being centered. The bottommost line in a textbox is, sorta centered, but about 20 pixels too far to the left. Once the line wraps THAT line gets centered properly, but the new bottommost line becomes off-center. Any idea what's going on? Picture attached.

Thanks!

alt text

screen-shot-2015-04-21-at-24632-pm.png (159.7 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by nyonge · May 10, 2015 at 09:16 PM

Note - for anyone left wondering, it was the font itself, like the actual ttf file. No idea what the problem was but switching that font out for a different but similar one solved the issue. (And on the plus side, the new font looks way better.)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image duck43 · Aug 31, 2016 at 08:41 AM 0
Share

Thanks for that note, I was having a similar problem and changing the font back to default Arial centered the text block. I don't know how long it would have taken without your advice!

avatar image
1

Answer by pfreese · Apr 22, 2015 at 12:16 AM

That has been noted as a bug and a fix is in the works. For a work-around, try adding an extra blank line to your text.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nyonge · Apr 22, 2015 at 04:20 AM 0
Share

Cheers, thanks!

avatar image
0

Answer by Pharaoh_ · Apr 21, 2015 at 07:23 PM

Tick Best Fit. Make a tiny change, such as hit spacebar and then delete it to allow the change to occur (it sometimes bugs for me).

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nyonge · Apr 21, 2015 at 07:34 PM 0
Share

Didn't work, the bottom line is still offset

avatar image Pharaoh_ · Apr 21, 2015 at 08:26 PM 0
Share

Then you either need to allow more space or make the font size fit the text field's width and height manually, by script.

avatar image nyonge · Apr 21, 2015 at 10:17 PM 0
Share

The spacing is fine, the text actually renders outside of the text box when it's offset in the bottom row. The problem seems to be the UI component not being able to properly calculate the Center aligned position.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I place a left or right aligned Text where it would be if it was center aligned? 0 Answers

how to align 2 different text together with scoring 1 Answer

How to align text? 1 Answer

Planning Text Scroll with Unity UI 0 Answers

UI Text.LineSpacing doesn't work when the Text has only one line ? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges