Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

TextMesh Pro \n and \t not converted anymore to linebreak or spacement

Discussion in 'UGUI & TextMesh Pro' started by Rafael_CS, May 15, 2021.

  1. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello @Stephan_B
    After upgrade to TMP 2.1.6 i noticed that '\\n' and '\\t' was not converted anymore to linebreak or spacement.

    Maybe this is by design?

    Best regards
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Both "\\n" and "\\t" in a string means to escape those control sequences. As such, the text should be displayed as "\" + "n" and "\" + "t".

    "\n" - Linefeed and "\t" = tab.

    Are these "\\n" and "\\t" text you enter in the Text Input Box or in a public field or in a string?