Lable2D lines and color

Hi there,

Is it possible to create multiline strings with Lable2D? Adding a new line /n did not work.
Adding string separately with an offset won’t as each string will rotate separately with regards to the camera.

And can you color parts of a Label2D text? Is there some kind of tag formatting supported?


You can make multiline strings using \n or \r\n.

Strings cannot have multiple colors I’m afraid. There’s no kind of tag formatting out of the box.

You can add a pixel offset using LabelAlignment - ALINE (which is kinda undocumented in the current version, but I’ve added documentation to it for the next version). It’s an optional parameter when calling Label2D.

Thanks for the quick reply. Turns out I used the wrong slash :no_mouth:

1 Like

Perfect, creating a custom alignment allows be to at least color each line separately. This is close enough for my purposes.

Thanks for the help.

1 Like