Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Ah I see, I must have understood this incorrectly when I added this feature. 


Please go to SuperTextMesh.cs, and on lik 1171, you should see some code that looks like this:

private static List<char> linebreakFriendlyChars = new List<char>(){' ', '\n', '\t', '-', '\u00AD', '\u200A', '\u200B', '。', '〜', '、', ',', '…', '‥', ' '};

If you remove  '、' and  ',' from the list like this...

private static List<char> linebreakFriendlyChars = new List<char>(){' ', '\n', '\t', '-', '\u00AD', '\u200A', '\u200B', '。', '〜', '…', '‥', ' '};

...I believe you should get the results you want. Please let me know if this works as you want, and I'll make sure this functionality is changed!

Thank you.

It seems work for Chinese break of my case, but not for English break with "," see screenshot here:

(1 edit)

Well, I compared it with Unity build-in Text, seems it behaves the same. (It will put "Looooooo" on the first line if I use ", " instead of ",").

Oh, you're right though, maybe the English "," should be added to the list of linebreak-friendly characters, too? I'm trying to think why i wouldn't have included it on the list in the first place... Feel free to give it a shot, and let me know if you prefer it! Either way, I'mm make sure to push the changes for the next update, so thank you for reporting this!

I don't know since I am not native English speaker, maybe "," is not usual for writing English? I saw people write "," always with a " ".  For me, I prefer do not add it, I guess it is good since it performs as same as build-in Text now.

Yeah, even though I'm a native English speaker, I guess rules like this can escape me... but yes usually  "," is followed by a " " anyway! I'll be sure to adjust STM to have the fix for Asian languages in the next upload I do, so I hope everything works for you!