Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: kbigdelysh on June 21, 2022, 09:01:47 AM

Title: Can't add 'TextMeshPro' component to Text (TMP)
Post by: kbigdelysh on June 21, 2022, 09:01:47 AM
I'm trying to set the text of a Text (TMP) UI element using "Set TextMesh Pro Text" action but it says I should click to add TextMeshPro component to it but I should not because it already has TextMeshPro component. Even if I click on that red message, it gives me the following error:

Quote
Can't add 'TextMeshPro' to Text (TMP) because a 'TextMeshProUGUI' is already added to the game object!
A GameObject can only contain one 'Graphic' component.

Please see the screenshot below:
https://1drv.ms/u/s!AkVZHwLefbyhluo7fMrY-f79kOXDLg?e=HvjYin (https://1drv.ms/u/s!AkVZHwLefbyhluo7fMrY-f79kOXDLg?e=HvjYin)

Why does it try to add a TextMesh Pro component while it already has that component?
Title: Re: Can't add 'TextMeshPro' component to Text (TMP)
Post by: djaydino on June 21, 2022, 07:24:48 PM
Hi.
There are to types of Text Mesh Pro copmonents , one for world and one for UI (Canvas)

Replace the Action with Set TextMeshProUGUI Text for the UI version
Title: Re: Can't add 'TextMeshPro' component to Text (TMP)
Post by: kbigdelysh on June 22, 2022, 12:16:43 PM
Thanks, but I cannot find the "Set TextMeshProUGUI Text" action neither in the Ecosystem browser nor the Action Browser.

https://1drv.ms/u/s!AkVZHwLefbyhluo8busoFIF6Y5PbjA?e=uZ34bn (https://1drv.ms/u/s!AkVZHwLefbyhluo8busoFIF6Y5PbjA?e=uZ34bn)
Title: Re: Can't add 'TextMeshPro' component to Text (TMP)
Post by: djaydino on June 23, 2022, 06:36:30 AM
Hi.
Are you using this package?

https://hutonggames.com/playmakerforum/index.php?topic=15008.0