Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: metaleap on September 12, 2013, 01:01:42 AM
-
This will sound crazy but ... NGUI has a handful of foreach statements, over time such statements accumulate unnecessary garbage adding to GC overhead when the GC does run:
http://www.reddit.com/r/Unity3D/comments/1m667q/060_fps_in_14_days_what_we_learned_trying_to/ (http://www.reddit.com/r/Unity3D/comments/1m667q/060_fps_in_14_days_what_we_learned_trying_to/)
Would replace them myself but then you keep updating this awesome package so maybe something to ponder --- stuff like this is so easy to replace with no downside or loss, so hope you'd consider it. All those tiny details do add up at runtime in a non-trivial game :D
Of course, those foreaches in the Editor scripts can stay. Those don't matter.
-
Which ones are you referring to? There shouldn't be any 'foreach' statements at run-time unless you're running it on Flash or Windows Phone 8. ActiveAnimation and getting touchCount from UICamera still needs the foreach, but those are generally not used every frame.