2D Toolkit Forum

2D Toolkit => Support => Topic started by: DarkSlash on December 12, 2014, 02:55:32 pm

Title: Overlapping objects (same collection) increase drawcalls
Post by: DarkSlash on December 12, 2014, 02:55:32 pm
I have 3 images overlapped as a background. They overlap with different "Order in layer" value. They all make 1 drawcall. I got 1 drawcall more for the camera, it makes 2 drawcalls in total.

I created a prefab with an image from the same collection as the backgrounds. It has a different "Order in layer" to overlap the background. I instantiate the prefab. I get a total of 4 drawcalls in the scene. I can instantiate how many prefabs I want and the drawcalls are always 4. Why is this? The sprites are from the same collection, it should not create more drawcalls (and why it takes 2 more drawcalls to render 1 prefab if it got only 1 sprite!)?
Title: Re: Overlapping objects (same collection) increase drawcalls
Post by: unikronsoftware on December 12, 2014, 03:07:56 pm
Do you have gizmos visible? Check that they are not visible.
Title: Re: Overlapping objects (same collection) increase drawcalls
Post by: DarkSlash on December 12, 2014, 03:26:00 pm
No gizmos :) Everything is deactivated but 3 background sprites + instantiated prefab.
Title: Re: Overlapping objects (same collection) increase drawcalls
Post by: unikronsoftware on December 12, 2014, 03:30:48 pm
Upload a repro case in the private support forum and I'll take a look.  I've not heard any reports of anything similar...