当前位置:   article > 正文

sprite的大小 unity_Unity中的Sprite纹理压缩(Sprite texture compression in Unity)

unity sprite大小

Unity中的Sprite纹理压缩(Sprite texture compression in Unity)

我希望稍微压缩一下我的png sprite textures这样它们就不会占用我为移动设备构建的那么多内存。 因为我使用了很多gif动画,这对我的游戏性能至关重要。 我寻找答案,但我找到的线程超过1岁,而不是sprites所以我想我问我的版本。 Unity中大小为224 KB的图像占用1.6 MB, 关闭 generate mip maps所以在我的游戏中压缩png sprite textures 。 怎么做?

I wish to compress my png sprite textures a bit so they don't take up that much memory as I build for mobile devices. As I use a lot of gif animations this is crucial for my game's performance. I looked for an answer but the threads I found were more than 1 year old and not about sprites so I figured I ask my version. An image that's 224 KB in size takes up 1.6 MB in Unity with the generate mip maps turned off So compressing the png sprite textures in my game. How to do that?

原文:https://stackoverflow.com/questions/41270144

2020-02-13 23:14

满意答案

尝试将Format设置为Automatic Compressed 。

为了在所有移动平台上工作,请确保初始图像的大小为2的幂(实际上我认为4的倍数应该足够,但只是为了安全起见)。

这会降低图像质量,但应节省一些空间。

关闭mip贴图也是一个好主意,因为mim贴图将图像的大小增加了大约33%。

还有一件事,确保将Non Power of 2设置为None ,这可能是您目前看到尺寸增大的原因。

Try setting Format to Automatic Compressed.

For this to work on all mobile platforms make sure the initial image has sizes that are power of 2 (actually I think that multiple of 4 should be enough, but just to be on the safe side).

This will lower the quality of the image but should save you some space.

Turning mip map off is again a good idea as mim map increase the size of the image by about 33%.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/106549
推荐阅读
相关标签
  

闽ICP备14008679号