Welcome,
Guest
. Please
login
or
register
.
April 26, 2026, 01:16:48 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
TypewriterEffect problem
« previous
next »
Print
Pages: [
1
]
Author
Topic: TypewriterEffect problem (Read 3759 times)
Joyzh
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 1
TypewriterEffect problem
«
on:
June 18, 2015, 09:20:47 AM »
public void ShowDownMessage(string txt){
label.text = txt;
label.GetComponent<TypewriterEffect>().ResetToBeginning();
}
//not show correctly
IEnumerator Start () {
ShowDownMessage("");
yield return new WaitForSeconds(3);
ShowDownMessage("abc");
}
//show correctly
IEnumerator Start () {
ShowDownMessage("123");
yield return new WaitForSeconds(3);
ShowDownMessage("abc");
}
It's weird that I can not clear label by set empty text on a TypewriterEffect label.
Can anyone help me solve this problem?
NGUI 3.9.0b
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: TypewriterEffect problem
«
Reply #1 on:
June 21, 2015, 06:24:24 PM »
Typewriter effect is supposed to work with text, but you aren't passing any. Why don't you simply set the text, and then if the string.isNullOrEmpty(label.text), then simply disable the TypewriterEffect instead of resetting it?
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
TypewriterEffect problem