Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: benjaben on March 11, 2014, 08:44:12 PM

Title: Trying to add text to a UILabel but I think I'm doing it wrong
Post by: benjaben on March 11, 2014, 08:44:12 PM
I'm trying to have text appear over time within an UILabel, but nothing is showing up onscreen when I run the corroutine. It works outside of the corroutine, but not within.

  1. string dialogue = "test";
  2. for(int i = 0; i < dialogue.Length; i++)
  3.                 {
  4.                         speechLoc.text += dialogue[i];
  5.                         yield return new WaitForSeconds(speed/dialogue.Length);
  6.                 }

Not sure if this how you do it properly, but it doesn't seem to be working.
Title: Re: Trying to add text to a UILabel but I think I'm doing it wrong
Post by: ArenMook on March 12, 2014, 12:00:15 AM
You mean like the TypewriterEffect script that comes with NGUI?