Author Topic: UIPanel.Fill  (Read 2416 times)

Finjitzu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
UIPanel.Fill
« on: January 31, 2014, 06:02:11 PM »
So I've recently buggered up my game here. I was getting a really stable frame rate. Then for some reason now I'm getting fairly drastic spikes. I'll cut to the chase.

I'm at NGUI 2.6.5 Unity 4.2.1f4 and I seemed to have increased the number of times UIPanel.Fill() gets called. On an older version of the project it barely got called at all, it was so in-frequent at first I though it wasn't ever getting called. But when it did the ms wasn't too bad. Now it gets called ALOT and I think that's the cause of my fps drop. Also when profiling on Android, the UIWidget.update seems to get called alot too.

I've done some googling, and it seems like this get's filled up when widgets get moved under a UIPanel? If so is the solution to add more panels? Is there anything else I can to get UIPanel.Fill() not being called so much? Any ideas what I could've done to increase this?

Here's the profiler when the panel fill is ok:


Now with it eff'd:


I've been trying a bunch of things, so I think the next thing to try is not move any widgets, just move the panels?

edit: ok did some digging in UIPanel.cs and added a debug.log in the .fill function. It's getting called every frame...this is bad right? Now to find out why...
« Last Edit: January 31, 2014, 06:34:37 PM by Finjitzu »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIPanel.Fill
« Reply #1 on: February 01, 2014, 12:50:13 PM »
2.6.5 is very out of date, and is not supported. If you want performance improvements, you need to update to the latest version.