Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: weilies on February 15, 2017, 11:22:11 PM

Title: Dialogue for Typewriter effect
Post by: weilies on February 15, 2017, 11:22:11 PM
Greeting,

Is it possible to show text with a "pause" in NGUI label?
E.g. "Hahaha.... {wait for 3 seconds} I wanna kill you~~!"
I only know it will pause at "." and not any point of the label

Secondly, how can i show newline (ENTER) in label text property?
Title: Re: Dialogue for Typewriter effect
Post by: ArenMook on February 18, 2017, 06:51:58 PM
Typewriter script is just an example. You can edit it as you like. It does have a "delay on new line" option btw -- how long to pause on a newline character. A newline character is '\n'.
Title: Re: Dialogue for Typewriter effect
Post by: weilies on February 21, 2017, 03:14:01 AM
I tried to change the label during runtime using Playmaker NGUI integration.

The end result display "\n" on screen rather than give me a line break.
Title: Re: Dialogue for Typewriter effect
Post by: ArenMook on February 21, 2017, 12:46:34 PM
Not sure about playmaker, but I'm guessing it doesn't use a multi-line input field. NGUI does, so when you press enter when editing the label's text, it creates a new line. Check with that plugin's author.

If you type \n in inspector, it's two characters. The \n is only processed when done via code, which is why I mentioned. In inspector on NGUI's side, you just press enter. Playmaker though? No idea...