- Home /
Unity IOS: Texture format?
Hi.
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?
Here I've found a good info about the problem, but still I have no idea how to resolve it...
http://iphonedevelopment.blogspot.com/2008/10/iphone-optimized-pngs.html
And it takes too much time for a png to be "changed" in a run-time, so the app slows down...
Well, actually it doesnt answer my question and I think I've made a solution for this problem - will post an answer once I check it out. Seems like XCODE was at fault.
Hi, I'm facing the same problem on iOS, have you managed to find a solution for this ?
Thanks.
b4cksp4ce - yes - check, I posted an answer - it haves to be POT and square :)
Answer by hlynbech · Oct 01, 2014 at 08:16 PM
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.
Answer by -Rix- · Aug 26, 2014 at 10:05 AM
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.