Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mulbin on July 14, 2017, 06:07:51 PM

Title: How to set text mesh? Using a string has no line break.
Post by: Mulbin on July 14, 2017, 06:07:51 PM
Hi all,

I have a text mesh which has multiple lines of text.  Trouble is if I want to change the text my only option seems to be to set the property using a string... but it only allows one long line of text. \n doesnt work, it just types "\n" into the text.  Is there any function out there for "set text" instead of trying to use a string?
Title: Re: How to set text mesh? Using a string has no line break.
Post by: tcmeric on July 14, 2017, 11:00:05 PM
I wrote a set of actions for textmesh pro for playmaker, however, textmesh had some big changes for 5.6 and 2017, which made it incompatible. However, since I also updated to 2017, I also need to update my actions. I will see if later today I can start with the set text action and post it here.
Title: Re: How to set text mesh? Using a string has no line break.
Post by: tcmeric on July 14, 2017, 11:01:56 PM
Ah, I see the issue here. http://hutonggames.com/playmakerforum/index.php?topic=13006.0
Title: Re: How to set text mesh? Using a string has no line break.
Post by: tcmeric on July 15, 2017, 07:17:52 AM
Ok, my actions are working fine with 5.6 and 2017 versions of textmesh pro (if you find any bugs, feel free to report them).

You can download them here: https://github.com/dumbgamedev/TextMeshPro_Playmaker

You can then use the action "Set textmesh pro text" or "set textmesh pro ugui text". It includes a field area, that can accept line breaks by pressing enter.
Title: Re: How to set text mesh? Using a string has no line break.
Post by: Mulbin on July 15, 2017, 02:32:48 PM
Great thanks!  I'll give them a try later tonight