Hello. I am working on a project where all the texture data should be loaded from a web server at runtime, so I decided to use WWW helper methods to do the job. Everything works, but I was wondering how can I get the smallest size in RAM from the imported textures.
Please bear in mind, that the main platforms are Android and iOS.
Currently, the images are getting downloaded as RGB24 since they are mostly .jpg.
public override IEnumerator InitFromWeb (GamePrefs gamePrefs, WWW www, byte[] rawData, Dictionary headers)
{
var filepath = gamePrefs.TexturesWebDirectoryUrl + Name + Extension;
Debug.Log("Loaded Resource: " + Name + ": " + filepath);
www = new WWW(filepath, rawData, headers);
yield return www;
Texture = www.texture;
Texture.Compress(false);
}
Texture.Compress are reducing them to DX1, but shouldn't Android's textures be compressed to ETC1 and iOS to PVRTC ??
How would I get the minimum size possible ??
Appreciated.
↧