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)