Author Topic: Late Update on stationary objects  (Read 1226 times)

TommiH

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Late Update on stationary objects
« on: July 23, 2014, 05:53:46 PM »
Hello.

It's another thread about the high CPU cost of the UIPanel.LateUpdate() function. We seem to be getting enough CPU consumption to drop the FPS in the Webplayer on a 2013 MacBook Pro from 60 to 30, all attributable to the UIPanel.LateUpdate(). This happens even if the objects are completely unchanged as far as I can tell (it's possible that some values are repeatedly given the same value it had before, but that shouldn't trigger a reconstruction, I presume? Our prime suspect is a set of 60 panels that each contain 1 extra UIPanel and 16 UISprites as children, adding up to 960 widgets combined.

Any help you could give would be appreciated. Should I look for some hidden change that triggers a reconstruction, or is that simply too many widgets for NGUI to handle?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Late Update on stationary objects
« Reply #1 on: July 23, 2014, 09:19:53 PM »
You can see when widgets are rebuilt by uncommenting line 1430 of UIWidget.cs.
  1.                                         // Want to see what's being filled? Uncomment this line.
  2.                                         //Debug.Log("Fill " + name + " (" + Time.frameCount + ")");
However if I understand it correctly, you have 60 panels, each containing 1 more panel inside? So you have 120 panels? What's the point of this? Why would you need so many panels?