Is it possible to combine sprite atlases? (Runtime)

Hello, I’ve been searching for a long time. but I couldn’t find any solution. Is it possible to combine multiple sprite atlas runtimes? or move sprites from those atlases to a new atlas? (android 2d game)

I am using addressable in my game. this is why i have different sprite atlas groups. It is possible to defragment manually before getting a build.

also 2d (order in layer) with a layered design. For this reason, sprites in the same atlas can be in different layers. different atlases break the draw call.

sample,
Atlas A
Atlas B
Atlas A
Atlas D
Atlas B
Atlas C
Atlas D
Atlas B

Atlas A for the theme, atlas B for the static invariant sprites in the game, atlas C for the character options, Atlas D for the different grouped effects. I can’t squeeze the atlas any more than that. These are the rankings.

unity sprite doesn’t merge atlases (they have the same material), reason: it says material property block. but i don’t use it. this is an inbuilt feature.

option 1) duplicating each sprite and adding it to different (before build) atlases. (this is not efficient)

option 2) merging sprite atlases into runtime (is this possible? and how to do it?)

option 3) create a new atlas runtime and copy the sprites from the previous sprite atlas to the new sprite atlas. (I don’t know how to do it)

Is there a simple solution for this? I couldn’t find a solution online.

Why doesn’t unity provide an easy way to do this? Seems like it’s really needed.

I’ve seen some code that is not runtime (in the editor), but I’m looking for a runtime (for android) solution.

(sorry i use google translate for english)

You might consider this Unity – generate SpriteSheets at runtime! – Da Viking Code

Github: GitHub - DaVikingCode/UnityRuntimeSpriteSheetsGenerator: Unity – generate SpriteSheets at runtime!

Thanks for the reply but I know about it. Like I said, I’ve been researching for a long time. I don’t like to use 3rd party unless I have to.

I also encountered a few negative comments, but I did not try. and many parts of the asset were last updated 5 years ago.

If Unity is really incompetent at this then I might start looking into 3rd parties.

Also is there no difference between sprite atlas and spritesheet? Things can get confusing because I’m installing with Addressable. duplication in memory, not counting references…

I wish unity was more open about these issues.

(Google translate)

@MelvMay what should I do for this? please help. thanks