Batching issue with Image in Canvas as a hp bar

I created a world space Canvas with a single Image inside it. To check if it batches, I duplicated some of them in the scene, tried to change fillAmounts, widths, colors - all of them always consumed only one draw call.

Then I made a prefab of this Image in Canvas thing, instantiated a bunch on the scene start, and used as hp bars for units. And there’s no bathing anymore, each one consumes a separate draw call.

Is there an explanation of this difference? And how can I force these instantiated hp bars to batch into one draw call?

I’m using 5.0 version of Unity right now.

How many world space Canvases did you have in this first case? The UI system does not build batches across Canvases, at least in 5.2 and onward.

I’ve tried 8. All got batched in one draw call.

Why doesn’t 5.2 do this kind of batching anymore? I heard it improved some performance. Not in UI, it seems?

And why is that difference between batching pre-created canvases and not batching instantiated on-run ones, don’t you know?

Is there a way to create a simple hp bar with UI objects, that would be batched in one draw call? It’s just one imge with fill mode and health fraction of the unit controls fillAmount of the bar. So simple, and so sad it is not being batched. Maybe there’s still a way to do it? Battles in my game may contain up to 50 hurt units, which would add 50 draw calls with the current implementation, and it’s not appropriate for mobiles.

I know, I can go the meshes + uv offsets way. It’s what I plan to try as soon as someone convince me, that it is not possible to have UI made hp bars to be batched. I hope there’s a way still. So simple and convenient, and I’ve already implemented it ;/

The way that was recommended to me by a Unity dev was to fit all your health bars into as few world space canvases as possible (one total? one per position?). I have yet to discuss this recommendation with the engineer that does our UI, so I don’t know the details.

Alright, thanks for the clarification. One Canvas isn’t the option for my 3d game with perspective view. So, will just try that mesh generation thing with uv shifts instead.