unity onlunity pot texturee can be compressed怎么办

Unity IOS: Texture format? - Unity Answers
Navigation
Unity account
You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio.
Unity IOS: Texture format?
Whenever i load a png via WWW class, XCODE says:
&WARNING: no native support for texture format 5, converting to 4!&
What exactly it does mean and what can i do about it? I guess it takes a while for IOS to accomplsh it(?). From what I understand IOS converts textures to its own format (PVRTC?). I tried searching but I still dont know how to resolve the problem. If I compress textures in inspector - it seems like those are only compressed in the inspector, cuz there is no real difference when it comes to loading a sprite via WWW class (real file is untouched?).
Did anyone had such warning?
Inspecting the enum TextureFormat, I found that 5 is ARGB32 and 4 is RGBA32.
When creating a new Texture2D from scripts, without a format specifier, Unity defaults to ARGB32, but is apparently not supported on iOS (tested on iPad 5).
Specifically using the constructor
newtex = newTexture2D (w, h, TextureFormat.RGBA32, false);
got rid of the problem on my iPad.
From what I've found out it seems that this error is about the texture size. Namely: it have to be POT(Power Of Two) and Square, meaning, if you upload a sprite, its best to have a 128x128, 256x256 etc - just fill the unused pixels with alpha color.
Hint: You can notify a user about this post by typing @username
Attachments: Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
6 People are following this question.}

我要回帖

更多关于 unity3d texture 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信