Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

[solved] Underline Functionality - Different Colour

A topic by vostok4 created Nov 26, 2018 Views: 43 Replies: 3
Viewing posts 1 to 4
(1 edit)

How is the underline functionality in STM exposed? All I could fine in the documentation is a patch note for v1.8.6:

  • Added a sample scene showing how to make underline & strikethrough effects.

Is it possible to change the colour of just the underline versus the font face? So we could have a white font, with a blue underline?

I just purchased the plugin in the Unity sale and I can say, yes, it does have coloured underline (and strikethrough) support. Seems a bit odd with the instantiated sprites under the text, but its there :)

Developer

Hey!


The underline code is handled a custom event - please check out the underline/strikethrough example scene to see how that works! (It's done this way so underlines can be drawn in any way without needing to be rigidly built-in. This method would let someone make a zigzag underline with little modification, for instance)

Basically, a custom event like <e2=underline>This text is underlined!</e2> is used to draw an underline under your text. The code I included lets you change colour per-mesh, so you should already be able to change the colour this way! Check out the components atached to the STM object in that scene, and that should explain it well!


-Kai

Yup, I see this and your example code is a perfect start. Thank you!