Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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:
    157
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,581
    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?