I load NPOT textures from files and then assign them to materials.The code like:
Texture2D tex = new Texture2D (2, 2, TextureFormat.PVRTC_RGB2, false);
WWW picWWW = new WWW (pathStr);
yield return picWWW ;
if (picWWW == null) {
picWWW LoadImageIntoTexture (tex);
}
renderer.material.mainTexture =tex;
In Unity 3.5 or Unity 4.0 it works fine on iOS;The loaded texture is in repeat mode as expected。
But it‘s in clamp mode in Unity4.1.x and Unity4.3.x.
↧