When I try to make a new line on a TextMeshPro, it’s displaying “\n” instead of a new line.
EDIT: To make a new line, just do this: TheString.Replace(“\n”, “\n”);
When I try to make a new line on a TextMeshPro, it’s displaying “\n” instead of a new line.
EDIT: To make a new line, just do this: TheString.Replace(“\n”, “\n”);
This should work fine provided the string is defined in code and not in a public field.
See the following thread for a detailed explanation.
Yes, it was not a good example.
What I do is getting the text on a server, it contains “sometext\nsometext”.
So the whole text is considered as text by Unity.
=> So, to make a new line, I just have to do this: TheString.Replace(“\n”, “\n”);