Search Unity

How to get \n and \t working in UXML?

Discussion in 'UI Toolkit' started by 5argon, Oct 28, 2021.

  1. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    When I was making long GUIContent.tooltip that requires several paragraphs, \n works.

    But in UXML while I can type \n just fine it is displayed literally \n. How to get new line and tabs?
     
  2. martinpa_unity

    martinpa_unity

    Unity Technologies

    Joined:
    Oct 18, 2017
    Posts:
    480
    Hi!
    This is one of those things where the UI Builder helps a lot, since you must use the ASCII code for them.
    For a new line, it should be
    

    and for a tab, it should be
    	
    .

    Hope that helps!
     
    5argon likes this.