Author Topic: [ngui3.8.1 unity4.6.2f1] Performance and look issue animating UIPanels  (Read 3199 times)

Nespar

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 2
    • View Profile
Hey guys,

I'm trying to do menu panel transitions. Each menu is an UIPanel, and transitions are simple TweenTransform, which are attached to the UIPanel, from a position outside of the screen to a position into the middle of the screen, without scaling or rotating.
The menus include one UIScrollView with many widgets, which are batched into 5 drawcalls, plus 2 more drawcalls from the rest of the screen.
While it takes the screens 0.5 seconds to each leave the screen and to enter the screen, I notice two things:
  • Big Frame Rate drops while moving
  • The Elements of the included UIScrollView are not rendered at their real position, but ahead, into the direction of the movement.
Everything is at it's position again when the tweening is over.

If I understand it correctly, moving only the UIPanel (and there is no anchoring on Update going on inside of it) should just move the generated draw call, and not recalculate geometry, right? Or am I missing for example that the menu, when it's offscreen, doesn't have a draw call yet, and those have to get generated while it's moving into the visible area? If so, is there a way to preload all draw calls offscreen, mark the Panels as static, and move them then?
Did you hear of the offset of the drawn content of the UIScrollView, or would you like pictures of it? Any idea why this happens?
And do you know if there is a better method to do those transitions, to avoid mainly the frame rate problems?

I'm sorry for so many questions, but this has been bugging me for quite some time now :/
Thank you for your help!
« Last Edit: March 26, 2015, 12:29:38 PM by Nespar »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Moving the panel should just move the draw call, yeah. The geometry within won't be changing. The initial framerate drop should only occur when the draw call first gets created, and it being created off-screen isn't an issue. The inner panel's offset during animations is something I am not aware of. Can you create a very simple repro case for me to have a look at?