playMaker

Author Topic: How to set text mesh? Using a string has no line break.  (Read 1111 times)

Mulbin

  • Junior Playmaker
  • **
  • Posts: 84
    • View Profile
How to set text mesh? Using a string has no line break.
« on: July 14, 2017, 03: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?

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 730
    • View Profile
Re: How to set text mesh? Using a string has no line break.
« Reply #1 on: July 14, 2017, 08: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.
« Last Edit: July 15, 2017, 04:18:30 AM by tcmeric »

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 730
    • View Profile

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 730
    • View Profile
Re: How to set text mesh? Using a string has no line break.
« Reply #3 on: July 15, 2017, 04: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.

Mulbin

  • Junior Playmaker
  • **
  • Posts: 84
    • View Profile
Re: How to set text mesh? Using a string has no line break.
« Reply #4 on: July 15, 2017, 11:32:48 AM »
Great thanks!  I'll give them a try later tonight