Unity-Simple-SRT
Unity-Simple-SRT copied to clipboard
Extra \n on the subtitle text.
Hi.
I'm using Subtitle Dispenser to place the subtitles on a 1087x180 rectangular box, but when the subtitle dispenser places an extra \n on the end of each subtitle and it messes with the alignment of the text inside the box.

Fixed it by going to the subtitle displayer and removing all the \n,\t,\r from the final text output. currentlyDisplayingText.text = currentlyDisplayingText.text.Replace("\t", "").Replace("\n", "").Replace("\r", "").Replace("\r\n", "");
Update: Found a better solution that fixes the issue without deleting all the other \n on the text. currentlyDisplayingText.text = currentlyDisplayingText.text.TrimEnd('\n');