playMaker

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

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • View Profile
    • Pixel Life - portfolio
Line break in GUI TEXT? [SOLVED]
« on: April 12, 2013, 11:45:02 AM »
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, 08:59:24 AM by Alex Chouls »
Remember, you don't fail unless you give up trying to succeed!

Saputo

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Re: Line break in GUI TEXT?
« Reply #1 on: April 12, 2013, 03: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: 686
    • View Profile
    • Assets
Re: Line break in GUI TEXT?
« Reply #2 on: April 12, 2013, 05: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, 05:55:30 PM by LampRabbit »

Saputo

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

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: Line break in GUI TEXT?
« Reply #4 on: April 12, 2013, 09:28:23 PM »
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 12, 2013, 09:30:10 PM by LampRabbit »

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • View Profile
    • Pixel Life - portfolio
Re: Line break in GUI TEXT?
« Reply #5 on: April 13, 2013, 05: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
    • View Profile
    • Pixel Life - portfolio
Re: Line break in GUI TEXT?
« Reply #6 on: April 13, 2013, 06: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
    • View Profile
Re: Line break in GUI TEXT?
« Reply #7 on: April 13, 2013, 08:33:19 AM »
it works great ty

weilies

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
Re: Line break in GUI TEXT? [SOLVED]
« Reply #8 on: February 19, 2017, 08: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 :)