- Home /
Sprite Packer also include original sprite in build
Hello! I'm having a hard time figuring the following out. I have packed sprites in an atlas thanks to the included Sprite Packer in Unity. When I make a build, I look at the editor log that specifies the assets in the build: there are the packed sprite AND the original sprites! That takes an unnecessary amount of extra space because all is already in the packed sprite.
How can I get rid of the original sprites in the build? Is there an option?
where your original sprites located in your project folder? if they are located in resources folder they will be included whatever you use them or not. if they are not located in your resources folder, make sure that you are not referencing them from any scene that included build.
Original sprites are located in the "Assets" folder but not in the "resources" folder.
I will check if the sprites are referenced elsewhere.
I checked. There are original sprites that are used in Prefabs that are not in the scene at startup but will be instantiated later. Is that what you mean by referenced? Because if it is the case, every sprite is referenced by default, no?
yeah, probably that references are the problem. you should consider to not use original sprites in that prefabs.
and no, not every sprite is referenced by default. you are experiencing this issue because you probably have references that prefabs in a scene, also that prefabs reference your original sprites. so, unity includes those original sprites too.