title: Unity 2019 - linebreak \n not working for UI text elements
body: <p>I am having some difficulty getting linebreaks to work for my Unity UI elements. (Unity 2019.2.17f1 Personal)</p>
  
  <p>What I'm doing is:</p>
  
  <pre><code>string twoLinesOfText = LanguagePack.getTextByID(ID);
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>twoLinesOfText = "Text line 1\nText line 2"
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>Text line 1
  Text line 2
  </code></pre>
  
  <p>Reality:</p>
  
  <pre><code>Text line 1\nText line 2
  </code></pre>
  
  <p>I have tried using "\n", "\\n" and "\r\n". None of these give the intended result.</p>
  
  <p>I assign the text to the component using</p>
  
  <pre><code>UITextComponent.GetComponent&lt;Text&gt;().text = twoLinesOfText;
  </code></pre>
  
  <p>Can this direct assignment be a problem? Do i need to push my string through a toString() or parse it somehow for the \n to be recognised?</p>
  
  <p>Workaround:
  I have a workaround. By using an XML file for my LanguagePack, and inserting (enter) linebreaks in the base file, I feed the linebreaks into my Unity UI elements. Obviously this is not ideal.
  Reading back the strings in Debug.Log does not show which linebreak code was ultimately used: it just breaks the string according to the (enter) linebreaks in the XML file.</p>