Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: KozTheBoss on April 12, 2013, 02:45:02 PM

Title: Line break in GUI TEXT? [SOLVED]
Post by: KozTheBoss 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?
Title: Re: Line break in GUI TEXT?
Post by: Saputo 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.
Title: Re: Line break in GUI TEXT?
Post by: escpodgames 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 :)
Title: Re: Line break in GUI TEXT?
Post by: Saputo 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.
Title: Re: Line break in GUI TEXT?
Post by: escpodgames 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)
Title: Re: Line break in GUI TEXT?
Post by: KozTheBoss on April 13, 2013, 08:24:49 AM
hey man :) thanks for taking your time to figure this out! I will try this asap :)
Title: Re: Line break in GUI TEXT?
Post by: KozTheBoss on April 13, 2013, 09:02:58 AM
Works like a charm! Thank you very much! :)
Title: Re: Line break in GUI TEXT?
Post by: Saputo on April 13, 2013, 11:33:19 AM
it works great ty
Title: Re: Line break in GUI TEXT? [SOLVED]
Post by: weilies 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 :)