Hey,
so; first off thanks for all the help in the previous threads ArenMook, it's been really helpful in getting me up to speed with NGUI.
Now onto the new question... I'm running into one small optimisation issue with UIPanel.LateUpdate in that my structure is as follows:
Parent(UIPanel)
-- Side Bar(UIPanel)
--- Lots of items here (UI Widgets and some Panels)
-- Main Screen(UIPanel)
--- Some Page(UIPanel)
---- Lots of items here (UI Widgets and some Panels)
--- Some Page(UIPanel)
---- Lots of items here (UI Widgets and some Panels)
--- Some Page(UIPanel)
---- Lots of items here (UI Widgets and some Panels)
This basically is a mobile sidebar whereby it comes in from the left, with the main screen moving right to accommodate. Anyway I'm tweening the Parent UIPanel to move it all over when the side bar is toggled.
Having searched the forum it seemed to suggest that each UIPanel would batch it's child objects into a mesh / single drawcall, so I structured it with lots of UI panels where by I accepted the increased drawcall count assuming if I moved the "Parent" UIPanel, it would only have to move the child UIPanels without really needing to update anything / much of a performance cost.
Unfortunately when I'm tweening the Parent, despite this structure, I'm still getting some a noticeable performance hit... All that's happening during this hike in UIPanel.LateUpdate is that the single parent object is being tweened; so it leads me to assume I'm doing something wrong in terms of the structure.
My question being - what should I be doing differently?
(p.s. I know I have more in UIRect.Update than I need to / am in the process of going thru and turning all the ones suitable to OnEnable).