Author Topic: Issues with NGUI Tween  (Read 6427 times)

ds85

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Issues with NGUI Tween
« on: December 01, 2015, 03:31:45 PM »
Hi,
My game ui is using ngui tweens for transition fx.The sample of one of the panel is:

NGUI PANEL(Tween Alpha)
 ->Child Widget Container(TweenPosition)
     ------>Contains various child widgets
 ->Start Transform(GO1)
 ->End Transform(GO2)

Now i animate ui calling Tween alpha on parent panel and tween position on container gameobject having all the widgets which use GO1 and GO2 to define start and end positions/rotation.
But I am facing some issues while animating ui's using above setup.The transitions effects are not smooth and acts in abrupt manner.Can you please tell me how i can further rectify my widget setup to smooth out the ui fxs.

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Issues with NGUI Tween
« Reply #1 on: December 09, 2015, 12:57:28 PM »
Can you elaborate on the "abrupt manner"? When you first start the app, the first two frames will have a lot of overhead resulting in skipping a part of the tween if you have it set to play on start. Also note that there is TweenTransform that you can use instead of TweenPosition -- it seems more suitable to what you're doing.

ds85

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Issues with NGUI Tween
« Reply #2 on: December 10, 2015, 07:47:14 AM »
I tried tween transform also but still,the tween transitions(from--->to)are not smooth, it happens with kind of pauses(Profiler shows High cpu usage in UIPanel.lateupdate).
There are two tweens playings simultaneously as shown in the above hierarchy(TweenAlpha + TweenTransform/TweenPosition).

Should the tweens act only on UIpanel,as my second tween(TweenTransform) is acting on empty Gameobject which is under UIPanel,holding all the widgets?


 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Issues with NGUI Tween
« Reply #3 on: December 10, 2015, 03:15:14 PM »
Moving panels is more efficient than moving widgets inside the panel, as moving panels around doesn't require draw buffers to be rebuilt while moving widgets does. Still, unless you are using some ancient version of NGUI, have thousands of widgets or are running it on a 386, there shouldn't be any noticeable stutters moving things around.