Search Unity

Batching Broken Up By Other Canvas Elements

Discussion in 'General Graphics' started by etopian, Aug 25, 2021.

  1. etopian

    etopian

    Joined:
    Dec 11, 2018
    Posts:
    9
    Hey all!

    I've been working on fixing up health bars to require fewer draw calls. When only the "bar" portion of the health bar is active, all of the health bars ion the screen are drawn in a single draw call.

    When I add an additional GameObject with a TextMeshProUGUI component, the health bars are no longer drawn in a single draw and instead draw calls alternate between rendering a text asset and rendering the sibling bar texture.

    Am I missing a setting that will allow me to keep the "bars" themselves to a single batched draw?

    Let me know what other details may be helpful!