Search Unity

Separate Style from Content

Discussion in 'UGUI & TextMesh Pro' started by jblattner_fhsteyr, May 12, 2018.

  1. jblattner_fhsteyr

    jblattner_fhsteyr

    Joined:
    Feb 19, 2018
    Posts:
    2
    Hi there, is there any way to separate the styles defined in "Default Style Sheet" from the content in the Text Input Box (Text Mesh Pro UGUI)?

    With other words, what I'd like to do is NOT using the <style=xx> tag inside the text input box but define the style that this text uses somewhere else (e.g. a dropdown menu).

    Reason is, I instantiate text elements from a prefab and each instance gets another content assigned. The content consists of "content" only, e.g. "This is text" rather than "<style=xx>This is text</style" - nevertheless I'd like to define what style should be used in the source prefab.

    - Michael