- Home /
Does Unity take GIF?
So I imported a 2048x2048 GIF texture that weighs about 45Kb, but Unity "compressed" it to 2.7Mb, so I'm guessing that it compressed the image to JPG or something? Does Unity take GIF textures at all? This is a problem since the texture will be streamed, so weight is a pretty big issue.
Answer by steakpinball · Mar 17, 2015 at 09:09 PM
Unity does import GIF files. But it does convert it to a platform specific format.
Yeah that's what I thought. So once it's converted and then put into an asset bundle, what's in the bundle? The 45 $$anonymous$$b GIF or the 2.7$$anonymous$$b texture file? I would guess Unity is smart enough to check whichever is lighter and then re-converts the GIF once the bundle is decompressed right? Thanks for the speedy reply BTW!
It saves the imported (2.7$$anonymous$$B) image. Otherwise loading times would be a lot longer. (Some projects can take up to 30 $$anonymous$$utes to import all the images.)
If you want to save the GIF itself, keep it outside of an asset bundle and use something like WWW.LoadImageIntoTexture to load it directly.
Actually, I just did a little test, exported only the texture and re-imported it in an empty project, and when I looked at the source file, it was a GIF. Looks like Unity prioritizes weight over import time, or maybe it just doesn't change the source file at all no matter the context?