- Home /
How Text Verices are created for UI.Text when Vertical overflow is set to Truncate
Hello
I need an explanation of such behaviour that I don't understand or a possible solution for my case.
In my project, I have a simple button with text inside. From Text component, I extract all vertices and search for boundary ones. 4 vertices allow me to put a debug box that covers only the text.
Until the text fits the size of the button everything works fine, but when the text is too big to fit the button and I change the Vertical Overflow of Text to Truncate, things start to mess around.
In the following link you can see the effect of fitting. Text overflow parameters for screenshots are:
(horizontal : Overflow, vertical : Overflow)
-1st screen
(horizontal : Wrap, vertical : Overflow)
- 2nd screen
(horizontal : Wrap, vertical : Truncate)
- 3rd screen
(horizontal : Overflow, vertical : Truncate)
- 4th screen
As you can see if I set vertical Overflow to Truncate the pink box doesn't cover the whole text and is in the wrong place. What can cause such behaviour ??
Your answer
Follow this Question
Related Questions
Positioning of Text vertices when text is alligned 0 Answers
Changing vertex positions of a uGUI Text Mesh 0 Answers
4.6 UI Text rect does not expand automatically 2 Answers
uGUI letter spacing and kerning 1 Answer
Missing canvas elements on Build & Run. 2 Answers