Author Topic: Full stop at end of label is not shown when using TypeWriterEffect  (Read 4908 times)

Meltdown

  • Jr. Member
  • **
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 56
    • View Profile
I've just downloaded 3.7.4.

I have added the TypeWriterEffect to a label.

When I write the following code, for some reason if I have a . at the end of a sentence, it never gets shown..

  1. _bottomDialogText.GetComponent<TypewriterEffect>().ResetToBeginning();
  2. _bottomDialogText.text = "Whats up doc.";

Just shows

Quote
Whats up doc

EDIT : It seems to be other characters too, even a ! at the end of a sentence.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Full stop at end of label is not shown when using TypeWriterEffect
« Reply #1 on: October 18, 2014, 08:56:47 AM »
First change the text, then call ResetToBeginning().

Meltdown

  • Jr. Member
  • **
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 56
    • View Profile
Re: Full stop at end of label is not shown when using TypeWriterEffect
« Reply #2 on: October 18, 2014, 06:16:19 PM »
That doesn't make any difference  :-[

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Full stop at end of label is not shown when using TypeWriterEffect
« Reply #3 on: October 19, 2014, 11:11:50 AM »
You're right, small bug there.

Change line 151 of TypewriterEffect.cs from:
  1. if (mCurrentOffset >= mFullText.Length) break;
to:
  1. if (mCurrentOffset > mFullText.Length) break;