- Home /
Question by
beachrunnerfred · May 15, 2015 at 05:26 AM ·
texture2dunity 4.6
How can I divide www.texture data into multiple Texture2Ds?
Hello. I have some code to retrieve an image from the web and use it to create a Texture2D object...
IEnumerator coDownloadWebScreenshotWithHeight(WebURL webUrl, Image image, int height)
{
string url = webUrl.URLWithHeight(height);
WWW www = new WWW(url);
yield return www;
Texture2D imageTexture = new Texture2D(www.texture.width, www.texture.height, TextureFormat.ETC2_RGBA8, false);
www.LoadImageIntoTexture(imageTexture as Texture2D);
www.Dispose();
www = null;
}
The problem is, some of the images I'm downloading exceed the 4096x4096 texture size limit. So I would like to create multiple textures, each with a max size of 4096x4096, and then stitch them together after they're created. How can I divide the www.texture data into multiple chunks that I can use to create multiple Texture2D objects?
Thanks in advance for your help!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613195618im_/https://answers.unity.com/themes/thub/images/avi.jpg)