Search Unity

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,595
    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?