- Home /
UI Scaling with Button Text
I have button prefabs that are added dynamically to the scene at runtime and while the button itself scales as needed to the resolution, the child text for the button comes along for the ride and looks fuzzy.
I have best fit selected and I have tried both true and false settings for the worldPositionStays in the SetParent
function that adds them to the scene.
I have also tried adding ContentSizeFitter and a HorizontalGroup as the docs suggest.
Has anyone been able to add a button (or anything with child text) with the canvas scaling on and have the text actually work increasing the size of the font and not inherit the scale from the parent object?
All statically placed text scales correctly with font size, it is only the buttons which are a child element that's scaled that is causing me grief.
Scaled:
Answer by SalvoSoftware · May 06, 2016 at 03:25 PM
I've experienced a similar issue while working with Unity's new UI. I basically made a button with a lot of texts inside, and I've noticed that some of them were more blurry than others, even if the settings was pretty much the same.
It seems like it depend on some kind of resizing algorithm made by Unity, you can try messing out with positions to see if you can fix this problem, but unfortunately I've found no 100% working solution.
Your answer
Follow this Question
Related Questions
Efficient uGUI Text scaling on mobile (Not Best-Fit) 0 Answers
Ui elements not scaling correctly 0 Answers
Canvas Button persistence 0 Answers
New UI Button: Have sprite fill entire button (overflow). 1 Answer