How to dynamically change part of text

I want to display a paragraph which contains two different text colors (depending on a word). Is it possible to change style to a part of text in the same Text Object?
The only solution I found meaningful is placing a dozen text objects next to each other and changing the style of each individual block of words. It that case, relative positioning becomes a real problem.
Is there a correct way to handle these problems?

I'm working in 2D using Lens Studio v4.36.1

Answers

  • Bakari Mustafa
    Bakari Mustafa Posts: 174 🔥🔥🔥

    Unfortunately, it is not currently possible to change the style of individual words or characters within a single Text Object in Lens Studio. The only way to achieve this effect is to use multiple Text Objects and position them next to each other, as you mentioned.

    To make positioning multiple Text Objects easier, you can try using a Screen Transform component with the Layout property set to Horizontal or Vertical. This will automatically position the child Text Objects next to each other in a row or column. You can then adjust the spacing between the Text Objects using the Spacing property.