Create a single sprite using multiple sprites (Merge multiple sprites into single sprite)

Hello everyone,

I want to create a single sprite using Unity Scripting, i am accessing a parent object containing all the children objects spriterenderer.

I want to create a single sprite of all those children objects containing sprite renderer, with respect to their positions.

I am able to access only one sprite and use it, but not able to merge it into single sprite.


You may want to box them in an empty game object.

It has virtually no hit on performance versus trying to make them one single texture.

Then all the sprites will inherit the parent object.

Great question…

I think for UI each single texture will cause draw calls plus more memory in final build size

Not with an atlas.

I think that’s what he want to create with those all sprites…Merge them onto single atlass…

Ah.

Yeah, I just did that in GIMP and manually cut out the sprites.

Just remember to use a square with sides that are a power of 2.

2
4
8
16
32
64
128
256
512
1024
2048

2 Likes

Great…I am planning to do tonight…DId you manually placed all sprites in single atlass or there is any plugin available which does the job?

A quick search on google shows there are tons of plugins, though I am not sure if any are any good (there are virtually no reviews/scores/comments for them :confused:

Personally I use Photoshop and just do it manually (if the separate sprites are already sized properly it’s pretty trivial). Though you can also check out TexturePacker

2 Likes

Yeah, pretty much.

There’s a few thing that are just simply easier to do on your own than try and use a plug in.

Sprite atlases and prefab atlases both come to mind.

For the sprite atlas, just take all the sprites you’ll use in an area and throw it on a 1024 x 1024 png file.

PNG is the fastest for sprite, btw.

Also, make sure to use point rendering if you want it to be pixalized and not blurry.

1 Like

Yes, basically i’m doing the same thing. So i want to create a single sprite from all those already placed children Sprites in the scene. So that i can manipulate in the game to perform a function using Image(Script) object.

You can check out the attached images to find more information on the problem. :slight_smile:

2907288--214206--Parent_With_Objects.png
2907288--214207--Image_To_Replace_Sprite.png

I ended doing same, created 1024 size png .

Just to be sure you talking about “Point” filter mode ,right?

1 Like

Yeah point filter. Otherwise you get some aa done and increase the chance of tearing when tiling sprites.