Search Issue Tracker
By Design
Votes
1
Found in [Package]
2.0.1
Issue ID
1184177
Regression
No
[TMP] Text is overlapped when pasted text's line breaks are deleted
How to reproduce:
1. Open the attached '1184177-TMP-text-overlap.zip' project
2. Open 'SampleScene' scene
3. Select Text (TMP) GameObject in the Hierarchy
4. Copy and paste some text to the TMP Text field in the Inspector
5. Delete line-breaks
6. Observe the text field in the Scene View
Expected result: Pasted text is not overlapped
Actual result: Pasted text is overlapped
Reproducible with: 2017.4.32f1, 2018.4.9f1, 2019.2.7f1(TMP 1.4.0, 2.0.1), 2019.3.0b4 (TMP 1.4.0, 2.0.1), 2020.1.0a5 (TMP 1.4.0, 2.0.1)
Note: TMP for 2017.4, 2018.4 downloaded from Asset Store
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
- "Draw Additional Lights Shadowmap" calls increase when custom MaterialBlockProperty is used
- Crash on _platform_memmove when importing the "Dragon Crashers - URP 2D Sample Project" to a new 2D project
- "Shader is not supported on this GPU" warnings and and shaders are not loading when building the project for non-Chromium browsers
- [iOS][URP] The screen flickers and the "Execution of the command buffer was aborted due to an error during execution" error is thrown continuously
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
Resolution Note:
The reported behavior is by design.
The original text contained both Carriage Return (CR) (\r) and Line Feed (LF) (\n). Deleting the LF leaves the CR in the text and as such since Carriage Return's function is to return the carriage to the start position of the line, the text is overwritten. Carriage Return does not add a new line.
I realize that text containing control characters (which are not visible) makes it hard to understand / decipher these types of behavior. At some point I do plan to add a mode where these control characters will be visible in the Text Input Box which should help alleviate this type of confusion.