playMaker

Author Topic: Line break in GUI TEXT? [SOLVED]  (Read 11332 times)

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Line break in GUI TEXT? [SOLVED]
« on: April 12, 2013, 02:45:02 PM »
yet another problem that i have run into =( I've looked on the Unity forums, and it seems that \n should make a new line and \t is tab, but none of them work when i input text via playmaker :(

Is there any way to make a line break via playmaker?
« Last Edit: April 13, 2013, 11:59:24 AM by Alex Chouls »
Remember, you don't fail unless you give up trying to succeed!

Saputo

  • Full Member
  • ***
  • Posts: 107
Re: Line break in GUI TEXT?
« Reply #1 on: April 12, 2013, 06:58:08 PM »
I was just messing with this last night for some triggers, and nothing worked /t /n nothing iv been looking into it and cant find anything yet. If you find anything let me know.

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Line break in GUI TEXT?
« Reply #2 on: April 12, 2013, 08:51:15 PM »
The only workaround for this is to copy and paste a return character (for example, from notepad).

Tested and works - I stored the return character as a string and then use build string with the separator as the stored return character :)
« Last Edit: April 12, 2013, 08:55:30 PM by LampRabbit »

Saputo

  • Full Member
  • ***
  • Posts: 107
Re: Line break in GUI TEXT?
« Reply #3 on: April 13, 2013, 12:13:27 AM »
@Lamp do u have any screen shots of this, showing how u did this? anything would help.

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Line break in GUI TEXT?
« Reply #4 on: April 13, 2013, 12:28:23 AM »
Sure thing - the return character part is hard to screenshot :P but ill explain

Open up textEdit, hit enter, select all, copy! you now have a return character in your clipboard. Create a string variable in playmaker with the return character.
See actions below

(note you dont need the GUI text updating everyframe unless you need it to)
« Last Edit: April 13, 2013, 12:30:10 AM by LampRabbit »

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Line break in GUI TEXT?
« Reply #5 on: April 13, 2013, 08:24:49 AM »
hey man :) thanks for taking your time to figure this out! I will try this asap :)
Remember, you don't fail unless you give up trying to succeed!

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Line break in GUI TEXT?
« Reply #6 on: April 13, 2013, 09:02:58 AM »
Works like a charm! Thank you very much! :)
Remember, you don't fail unless you give up trying to succeed!

Saputo

  • Full Member
  • ***
  • Posts: 107
Re: Line break in GUI TEXT?
« Reply #7 on: April 13, 2013, 11:33:19 AM »
it works great ty

weilies

  • Junior Playmaker
  • **
  • Posts: 74
Re: Line break in GUI TEXT? [SOLVED]
« Reply #8 on: February 19, 2017, 10:33:24 AM »
Sorry for posted in the old post (but it's related)

I am using Window and can't resolve using the advised method (create a newline character in text editor > select all >copy & paste to a new variable)

I have attached the working scene (am using NGUI instead of UGUI).
Thanks for the help in million :)