- Home /
sprite vs texture
Hi, I am developing a 2D game, when i importing a png image to unity with the size of 400KB 1024x768 - it becomes 4MB as sprite and when i change it to texture mode, its size becomes 0.7MB in unity, why sprite showing this much size. Will the build size be reduced when i use textures in plane with material instead of sprites?
Thanks in advance, Ben
You probably have $$anonymous$$ipmap on which creates sub version of the texture, could be one thing already.
The choice of sprite over texture is more a matter of where you use them. For the new UI system, you gave to use sprite. You can still have a texture but then you have to create a sprite by code.
If you use 2D, sprite again, if you use 3D model then no sprite, just texture and uv map.
Answer by FortisVenaliter · May 18, 2015 at 06:14 PM
Here's a couple reasons why it might be balooning up:
Mip maps. Basically smaller versions of the textures are created for long-distance viewing without crappy pixel interpolation. Remove or reduce them to get some space back.
Auto-sizing. Graphics cards only really like textures that are sized in powers of 2. I'm not 100% sure that Unity automatically resizes, but I think it does, so it would store your texture as 1024x1024.
Compression. Unity does not use the default encoding from the input file. In the bottom of the inspector window for the texture, you'll see the compression and sizing settings. If uncompressed, it's basically stored like a bitmap. You can try changing the compression settings to find one that strikes a good balance for you.
Your answer
Follow this Question
Related Questions
Sprite.Create is not working 1 Answer
Sprite Packer is always disabled [Problem] 1 Answer
Overlay texture on sprite 0 Answers
Replace a sprite by another in every game object using it 1 Answer
Unity 2D sprite mask? 1 Answer