#Need help accessing a Text from a TextMeshPro via Script

1 messages · Page 1 of 1 (latest)

mystic abyss
#

I wanna access the Component TextMeshPro - Text (UI) via Scripting and change the Text value dynamically

#

This is my Script. I have tried a lot of combinations and can't seem to get it right.

thick basin
#

wow that was horribly constructed

#

my bad

tranquil glade
#

the class you want is TextMeshProUGUI

thick basin
#

oh yeah did not catch that

weak rain
#

Or the less derived TMP_Text

willow stone
#

And it has a .text property that holds the string

mystic abyss
#

i didnt know how to import (using directive) the TextMeshProUGUI

weak rain
#

using TMPro

mystic abyss
#

it wasnt clear on the docs or i'm just too new

#

i'll try that

#

thank you very much

weak rain
#

Nvm i got it wrong

tranquil glade
weak rain
#

Nevermind again thats actually right

#

Textmeshpro has alot of different naming