Search Issue Tracker
Won't Fix
Votes
17
Found in
2017.2.0f3
Issue ID
959062
Regression
No
"TextGenerator().GetPreferredWidth/Height" ignores "TextGenerationSettings"
Reproduction steps:
1. Open "TestProject.zip" project
2. Open "textgeneration" scene
3. Enter Play mode
4. Look at the Console output and see that with different font sizes, the Preferred Width/Height are always the same
Expected Result: The Preferred Width/Height of text changes based on the different "TextGenerationSettings"
Actual Result: The Preferred Width/Height of text is always the same, no matter the settings (Height 15/ Width 220)
Reproduced with: 2018.1.0a1, 2017.3.0b5, 2017.2.0f3, 2017.1.2p1, 5.6.4f1
Note:
Change "Text Generation" scripts 17, 23, 31, 39 lines "TextGenerator().GetPreferredWidth" to "TextGenerator().GetPreferredHeight" to see that it affects the height as well
Comments (2)
-
ThorBrigsted
Feb 05, 2021 10:52
"Some users rely on this feature being broken"
I swear this is straight out of an xkcd sketch
-
dbbrennan
Dec 22, 2018 09:51
Why won't fix? Surely there must be some alternative way of doing it then if you aren't fixing this? Please fill us in on how we are meant to do it!
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Terrain Tree cast Realtime and Baked shadows simultaneously when "Mixed" Light mode and "Subtractive" Baked Illumination is used in Edit mode
- OnPostprocessAllAssets() is not called for a modified Prefab when another Asset is set Dirty in the same callback
- [Android] UIToolkit ClickEvent is fired when the device is rotated
- Compilation errors occur when "uintBitsToFloat(int)" gets used in OpenGLES
- User Reporting does not send reports when Managed Stripping Level is set to Low or higher
Resolution Note (2018.3.X):
This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.