I can’t figure why this is happening…
every sprite is identical
the sprites are packed with same tag
but instead of 1 draw call, its many draw calls… the objects are at scale of 1, just different positions
the object has an array of sprites, and when its started the spriterenderer is assigned a random sprite that is defined in the array
the object itself is instantiated multiple times
I tried taking out the array of sprites and just use the one thats assigned in the inspector and when 20 of the object is instantiated, the drawcall is 1.
When each object is instantiated with the array of sprites and a random one is assigned as the sprite, the draw call goes crazy.
Hi, are the sprites really packed into an atlas? If they are in the “Resources” Folder they will not get packed afaik (you can verify packing somewhere in the menus “Sprite Packer” or smth.), also, check this:
they are not in the resouces folder, just under assets.
i am sure they are packed fine because if i duplicate the object without changing the sprite from code, its 1 draw call.
if i change the sprite from the sprite in the array, its multiple draw calls