Line breaks double when importing a CSV file and re-opening the project
Unity: Text (TextMeshPro)
Won't Fix
6.0.X
2022.3.X
Given this is not a regression and long-standing behavior, in uGUI, we do not plan to fix it anytime soon if ever.
Reproduction steps:
1. Open the attached “doublinebreaksissue.zip” project
2. Open the “testlinebreaks” Scene
3. Select the “Text (TMP)” GameObject from the Hierarchy
4. In the ‘Localize String Event’ Component set the ‘String Reference’ to None
5. Open the ‘Localization Tables’ Window (Window > Asset Management > Localization Tables)
6. Click “+ New Table Collection” and create a new Table (e.g. ‘Testing’)
7. Click “Import” and import the attached “TEST_LB.csv”
8. Observe the line breaks of the “MUSEUM_TANKX_TOOLTIP” key in the English cell
9. Select the “Text (TMP)” GameObject from the Hierarchy again
10. In the ‘Localize String Event’ Component set the ‘String Reference’ to ‘Testing/MUSEUM_TANKX_TOOLTIP’
11. Observe the line breaks in the Game view
12. Save and Exit the project
13. Reopen the project
14. Observe the Game view
Expected result: There are two line breaks as observed before
Actual result: There are four line breaks
Reproducible on: macOS 14.6.1 (M2 Max), Windows 11
Not reproducible on: no other environment tested
Note:
User discovered this issue when re-importing CSV's from the external localization theme where more and more linebreaks got added. Also when changing the text sometimes <CR> gets converted to /r/k
Prioritise and Follow this issue
Have a workaround or additional info about this issue?