Author Topic: NGUI Slow on Ipad 2 ONLY  (Read 5245 times)

JACLEMGO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
NGUI Slow on Ipad 2 ONLY
« on: April 28, 2014, 01:28:42 PM »
I have a few comments, most of these have TweenPosition added to them, one of these are a in game feedback system, displaying words when the user answers questions, the label tweens to the middle of the screen and back to out side of the screen, each time the label comes down, you can see a lag on the ipad2, the lag lasts for about 1 sec, and then the game runs normal again, till next time the feedback is shown, or any other objects, tween is called. Even the health bars (UISlider) does the same, when updating the value.

Please help!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Slow on Ipad 2 ONLY
« Reply #1 on: April 29, 2014, 12:52:14 PM »
Tween the panel instead of the sprite and you won't notice any lag. Every time you change the contents of a panel somehow by tweening something, changing the color, or moving it you cause the entire draw buffer to be rebuilt.

JACLEMGO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: NGUI Slow on Ipad 2 ONLY
« Reply #2 on: May 16, 2014, 12:16:17 PM »
@ArenMook,

Does each label need to be in its own panel, and then the tweening should be on the panel?
Im working on an educational game, so the text and colors change quite often, will the above (each label in its own panel) solve color/text change lags?

I get the same problem when I update the value of sliderbars.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Slow on Ipad 2 ONLY
« Reply #3 on: May 16, 2014, 02:52:48 PM »
No need to put them on their own panel, but it's generally a good idea to separate frequently changing content from static one. In any case you won't notice any difference unless you are doing this on a mobile device with limited performance.