Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: alexlange on February 04, 2014, 10:55:26 PM

Title: [Fixed] How does NGUI count Widgets and Drawcalls?
Post by: alexlange on February 04, 2014, 10:55:26 PM
NOTE: This seems to be a bug in earlier version, after upgrade to the latest, it works good.

Hi, currently I'm optimizing my game for mobile device. I think all UISprites sharing a same atlas in a panel should only use 1 DC, and each UITexture cause extra 1 DC, is it right?
Now I have 2 prefabs like below. In Game scene, there will be 6 prefabA & 6 prefabB , so I guess the DC total count should be 1+6=7. 1 is for all widgets sharing my atlas and 6 is for each UITexture.
Unfortunately the panel tool shows there're 49WG & 30DC in this panel, it really cause some performance problem of UIPanel.LateUpdate() in profiler.
Where am I wrong? The depth? The label?  Thank you!
  1. PrefabA (UIFollowTarget)
  2.     |---UISlider(HP)
  3.     |        |---background (fromSameAtlas)
  4.     |        |---foreground (fromSameAtlas)
  5.     |---UILabel(Name, DynamicFont)
  6.  
  1. PrefabB
  2.     |---UISlider(HP)
  3.     |        |---background
  4.     |        |---foreground
  5.     |---UILabel(Name)
  6.     |---UITexture(Portrait, only thing different from PrefabA)
  7.