Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
17
Question by imp903 · Jun 20, 2015 at 09:02 PM · unity 5guitextguitext

Fix Blurry UI text?

When I was building this UI, I didn't realize that resizing by pressing T and dragging the windows, I would totally screw up the resolution of any image I was resizing, and only later did I realize I should have been using the scale instead to preserve the resolution. That said, now I have a nearing completion UI that's starting to look bad, but my problem is that this UI is for a crafting menu. That said, because of the simplicity of the inventory system, I made the text contained in the UI and actual UI is a game mechanic just for ease of construction (i.e. if a light turns on as a result of the item existing in your inventory, then the condition for the craft button OnClick function is met and you can craft it). So I really don't want to destroy the UI and start over from scratch overlaying all the images and such, because that would mean a lot of backtracking on the game mechanics themselves as well. Is there some way I can set the UI elements all back to their respective default resolutions without getting rid of them, resizing them using the scale tool this time instead of changing the aspect ratio (i think that's what it is I was using?) to avoid destroying it and starting back from the beginning? Here's a screen shot to show the resolution deterioration I'm referring to as I created more panels on top of panels. This isn't the whole UI, but the other screenshot exceeded the limit, but there is another behind this one also. The text in the bottom left of this was created second (after the panel that's behind this one) and then the text on the right in that selection box was created third, and even between these it's pretty easy to see and by the time I got to the text in that menu on the right, It became near illegible. Thanks in advance for any help you guys might have

alt text

ui-window-3.png (129.0 kB)
Comment
Add comment · Show 7
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 RMMStudios · Jun 20, 2015 at 10:14 PM 0
Share

What kind of objects are you using for the text? Is it just an image or is it a text$$anonymous$$esh or something?

avatar image imp903 · Jun 20, 2015 at 11:17 PM 0
Share

the text objects are just the standard text that comes parented to the button when you create a UI button from the create menu. I just swapped out the sprites and the text font

avatar image MD_Reptile · Jun 21, 2015 at 01:09 AM 1
Share

I am not sure this is the problem or if it will help - but maybe the scale of the text objects are scaling with the parent objects - so maybe try dragging them out so they arent children of those buttons, reset their sizes (scale) to be correct aspect, then drag them back into the buttons as their children. Perhaps this will help?

avatar image imp903 · Jun 21, 2015 at 06:37 PM 0
Share

Actually $$anonymous$$D_Reptile that did fix a large part of the problem in that it did restore the aspect ratio, so that was a large relief because I didn't have to restart the entire crafting UI. But, after some experimentation, if anybody else finds this later and wants to know how to fix it, I found that if you scale up the width and height to some massive number, then bring the font size up to match it, you can simply use the scale tool to then bring it down without losing resolution. Should have been more obvious I guess considering I even mentioned the concept in my question somewhat but I didn't put two and two together. Now though it's crystal clear, so thanks for your input guys

avatar image MolhamM · May 02, 2019 at 08:11 PM 0
Share

Here's a video how to do it in 1 $$anonymous$$ https://www.youtube.com/watch?v=vARzcwlA2qI

Show more comments

10 Replies

· Add your reply
  • Sort: 
avatar image
83

Answer by beefjerkay · Aug 28, 2017 at 06:09 AM

The best way I've found is to:

1) Increase font size massively (size 150 or something).

2) Set both horizontal and vertical overflow to 'overflow' in the inspector for the text box.

3) Scale the textbox down using the scaler tool.

The text should now be sharper.

Comment
Add comment · Show 7 · 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 yoyyoffg · Nov 03, 2017 at 09:58 AM 2
Share

Thanks a lot

avatar image churi24 · Dec 03, 2017 at 09:57 PM 1
Share

This is correct.

avatar image nguyenlamlll · Jan 06, 2018 at 12:57 PM 0
Share

I want to note this. When you play with scale, ideally X and Y should be equal. Lol, I've spent almost 15 $$anonymous$$utes wondering why my text looks stretched horizontally.

avatar image unity_01PGd8fSslYcLA · Apr 06, 2018 at 07:40 AM 0
Share

Please do yourself a favor and don't do this. Every part of this answer is screa$$anonymous$$g "future headache" when you want to change anything. Follow the "Dynamic Pixels Per Unit" answer ins$$anonymous$$d.

avatar image ikybeadie · Mar 27, 2019 at 02:27 AM 0
Share

This helped me so much, thank you!

Show more comments
avatar image
31

Answer by Bip901 · Jun 22, 2017 at 05:15 PM

In the canvas (Canvas Scaler component), set the "Dynamic Pixels Per Unit" value to something higher.

Comment
Add comment · Show 5 · 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 chunk_split · Mar 10, 2018 at 04:29 AM 3
Share

This seems to work on sprites, but for some reason it doesn't apply to the text inside the UI elements, which was the main issue. See example below.

alt text

2018-03-09-20-28-18.gif (346.5 kB)
avatar image guneyozsan chunk_split · Apr 06, 2018 at 09:26 PM 1
Share

It also breaks the graphics of UI elements as you can see on the edges of the UI elements in the gif screenshot.

avatar image unity_01PGd8fSslYcLA · Apr 06, 2018 at 07:38 AM 2
Share

This answer is correct. In your gif, you are changing reference pixels per unit, whereas the answer is stating that you should change dynamic pixels per unit, which I can confirm to be the correct solution.

avatar image chunk_split unity_01PGd8fSslYcLA · Apr 06, 2018 at 05:58 PM 0
Share

Right, I'm a bit new but I did change that and it appeared to have no effect on the text/labels inside my canvas. In my case, I was able to resolve my problem by ins$$anonymous$$d importing my own font and then in the import settings in the inspector, configuring the font size to something a bit larger like 30 or 60.

Sorry for the misunderstanding, though!

avatar image guitarjorge24 · May 11, 2020 at 11:11 PM 0
Share

I think Dynamic pixels per unit doesnt exists anymore in Unity 2019, any new solutions?

avatar image
2

Answer by U_Ku_Shu · Aug 08, 2016 at 11:21 AM

I had post few solutions for this problem here:

http://answers.unity3d.com/questions/1226551/ui-text-is-blurred-unity-535f.html

Comment
Add comment · 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
1

Answer by Zacka · Oct 04, 2019 at 01:55 AM

Enabling Pixel Perfect in the UI Canvas was the solution to my blurry text issue.

Comment
Add comment · 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
-2

Answer by z25assassins · Apr 02, 2017 at 09:59 AM

https://youtu.be/gt_tkXfOYqs try this

Comment
Add comment · 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
  • 1
  • 2
  • ›

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

47 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 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 avatar image

Related Questions

What's wrong with my function? It keeps telling me 'loseText' is not a member of 'UnityEngine.GUIText'. Please help, please and thank you! 0 Answers

Create GUIText from Javascript 3 Answers

Gui text, ammo counter 1 Answer

I have a "display text one letter at a time" script. Can I modify it to display a complete string of text on command? 1 Answer

Trouble getting GUIText positioned correctly. 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