Author Topic: TypewriterEffect new line bug? (with video)  (Read 9867 times)

Paul

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 22
    • View Profile
TypewriterEffect new line bug? (with video)
« on: November 16, 2016, 02:11:54 PM »
I'm using the Typewriter Effect component (I know this isn't technically part of NGUI) but I'm noticing this odd behavior. It only seems to happen when the text is long enough to shrink slightly in size. (Ignore all the W's -- that was to make it easier to reproduce).

Using Unity 5.4.1 and NGUI 3.8 (I know this is a much older version, but we can't easily upgrade at the moment).

Was this ever a known bug or possibly fixed with later updates? I believe we've seen this since the beginning of our project on Unity 4.6.




http://imgur.com/a/J1vvQ

Any help would be greatly appreciated.

Paul

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: TypewriterEffect new line bug? (with video)
« Reply #1 on: November 16, 2016, 02:25:47 PM »
I didn't see an edit button for the OP, but I realize this can actually be reproduced without the TypewriterEffect component at all. It must be something with UILabel causing the odd wrapping, but I'm still at a loss for where exactly it could be.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TypewriterEffect new line bug? (with video)
« Reply #2 on: November 20, 2016, 11:42:19 AM »
I've never been able to reproduce this on my end, so I could never fix it. If you can create a clean repro case for me to look at, I'd love to tackle it.

Paul

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: TypewriterEffect new line bug? (with video)
« Reply #3 on: November 22, 2016, 12:31:49 PM »
Thanks for checking in, ArenMook.

After a little more digging, I found another thread (lost the link now) where you suggested turning on KeepFullDimensions for the Typewriter component. So far I believe this seems to have fixed it, although I've moved on to other tasks for the moment.

With that enabled, it looks like the text is essentially preshrunk before the first character appears, so it doesn't resize on the fly which seemed to cause the odd wrapping. Does this make sense? Would you expect turning on KeepFullDimensions to fix something like this?

Thanks again!!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TypewriterEffect new line bug? (with video)
« Reply #4 on: November 27, 2016, 04:09:52 PM »
Keeping full dimensions means the text is effectively pre-printed, determining its final size and that final size is used instead of recalculating it every time the typewriter changes what's visible -- so yes, that's a good solution although it merely bypasses the issue.