- Home /
Can CanvasGroup be used to balance the Canvas Rebuild / Draw Call ratio?
My setup is like this: There are many 3D soldiers on the map of a top down strategy game. Every soldier has a healthbar above their heads. I have a single fullscreen UI canvas and healthbar UI objects are children of the single canvas. They are NOT children of each 3D soldier object in 3D world.
In this setup, I assume that the single Canvas geometry will be rebuilt CONSTANTLY because of the movement of healthbar objects along with moving soldiers.
I know that I can use nested canvases for each healtbar to prevent this constant canvas geometry rebuild operation (in cost of additional drawcalls) but I don't like the idea of nested canvases.
Question: Instead of nested canvases, can I use CanvasGroup on healthbar UI objects to achieve the same thing? I mean, Does the CanvasGroup prevent the canvas to rebuild the entire geometry (in cost of additional draw calls) ?
Answer by Xtro · Apr 27, 2017 at 03:53 PM
The answer is no. CanvasGroup doesn't affect the geometry rebuild operation unlike nested canvases. I got the answer from multiple sources. One of them is here: https://www.reddit.com/r/Unity3D/comments/67vq20/can_canvasgroup_be_used_to_balance_the_canvas/dgtkuu1/
Your answer
![](https://koobas.hobune.stream/wayback/20220612120754im_/https://answers.unity.com/themes/thub/images/avi.jpg)