Author Topic: UIPanel and drallcall?  (Read 4630 times)

chiuan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 6
  • Posts: 11
    • View Profile
UIPanel and drallcall?
« on: September 10, 2013, 09:18:37 PM »
one UIPanel contain 1 drallcall,if duplicate some of this UIPanel item,mean more drallcall??

root
-uipanel - 1drallcall

after duplicate the same uipanel.

root
-uipanel - 1drallcall
-uipanel - 1drallcall
-uipanel - 1drallcall
-uipanel - 1drallcall

still 1 drallcall???

miyudreams

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Re: UIPanel and drallcall?
« Reply #1 on: September 10, 2013, 09:40:35 PM »
Draw Calls are based on the number of atlases and dynamic font materials used in your scene.

If you click on your root - UIPanel, it shows you stats for the number of draw calls you are using.

In my example, I am using 1 atlas of sprites, 3 dynamic font materials, so my draw calls say:

Draw Calls 4

If I have any other UIPanels in children nodes, notice how they show Draw Call 0.


chiuan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 6
  • Posts: 11
    • View Profile
Re: UIPanel and drallcall?
« Reply #2 on: September 10, 2013, 10:46:30 PM »
Draw Calls are based on the number of atlases and dynamic font materials used in your scene.

If you click on your root - UIPanel, it shows you stats for the number of draw calls you are using.

In my example, I am using 1 atlas of sprites, 3 dynamic font materials, so my draw calls say:

Draw Calls 4

If I have any other UIPanels in children nodes, notice how they show Draw Call 0.



that's because the first time all children nodes add into UIPanel - 2D UI,and than add a new panel at one child,this wont add again.so that new uipanel drallcall 0.
i wanna test is UIPanel.LateUpdate function,you know each child changed,will Refresh all of those,will spend a lot of performance....

1、if i make the struct like this(child are the same.)
root(uipanel-0drallcall)MainObject
-child(uipanel-1drallcall)
-child(uipanel-1drallcall)
-child(uipanel-1drallcall)
-child(uipanel-1drallcall)
-child(uipanel-1drallcall)
-child(uipanel-1drallcall)
-child(uipanel-1drallcall)

2、only 1 uipanel at root.
root(uipanel-1drallcall)MainObject
-child
-child
-child
-child
-child
-child
-child