Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Formatting Text

Discussion in 'Immediate Mode GUI (IMGUI)' started by nm8shun, Feb 13, 2008.

  1. nm8shun

    nm8shun

    Joined:
    Jul 14, 2007
    Posts:
    476
    OK...so I really like the Scroll View aspect of the new GUI stuff. It seems to be a great thing for a lot of text data.

    The problem I have is how can I format that text within a long text box? Right now, it all seems to need to be within one long line (no returns). Am I using this incorrectly?
     
  2. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    \n will generate new lines, if that's all you want.
     
  3. nm8shun

    nm8shun

    Joined:
    Jul 14, 2007
    Posts:
    476
    Thanks. That's a start. What about things like quotations (anything in quotes seems to read as something else in Unitron.)
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You need to escape them...\ is the escape character (like with newlines). \"

    --Eric