I made a script to download some images from the web on click page, and when I moved to the second page, a second set of images was downloaded, but the problem is that the image size is relatively large, and when there are more than one image, it consumes a lot of RAM, how can I save as much memory as possible by compressing the texture
this is my Code
IEnumerator D_Image(string url_)
{
Destroy(Icon.texture);
Icon.texture = LoadT;
using (UnityWebRequest uwr = UnityWebRequestTexture.GetTexture(url_))
{
yield return uwr.SendWebRequest();
if (uwr.result != UnityWebRequest.Result.Success)
{
Icon.texture = ErrorT;
}
else
{
Icon.texture = DownloadHandlerTexture.GetContent(uwr);
}
uwr.Dispose();
}
}
