Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: nah0y on August 14, 2012, 08:36:34 AM

Title: UIPanel.LateUpdate performance
Post by: nah0y on August 14, 2012, 08:36:34 AM
Following your advice to put everything that should move in a separate UIPanel, I still have some slow behavior.

When I click a button, this will move down a UIPanel (with a lot of elements on it) and move up another one. And in the profiler I see that UIPanel.LateUpdate() takes 100ms to complete.

Didn't you said that this should be super fast because we just move the UIPanel ?
Title: Re: UIPanel.LateUpdate performance
Post by: ArenMook on August 14, 2012, 03:14:04 PM
Yes it should. Moving panels has almost no cost associated with it. Sounds like something is still happening that shouldn't. You are moving the actual UIPanel, not its child, right? Try putting a Debug.Log in the UIPanel's UpdateTransforms function, after "if (node.HasChanged())" to determine what is still changing.
Title: Re: UIPanel.LateUpdate performance
Post by: nah0y on August 16, 2012, 05:17:02 AM
I'm using a UIPanel with a draggable panel script on it.

I've tried to put logs in the method you said, well absolutely nothing logs (after init of course) when I'm not scrolling, and when I'm scrolling, only 2-3 widgets are updated from time to time.
Title: Re: UIPanel.LateUpdate performance
Post by: ArenMook on August 16, 2012, 10:19:44 AM
Well, this suggests that your issue is not in the draggable panel. Try deep profiling and see if you can figure out what's really eating up so much time.
Title: Re: UIPanel.LateUpdate performance
Post by: nah0y on August 16, 2012, 02:27:04 PM
As explained in the email... I don't know what it is :(