public static Texture2D GetScaledCopy(this Texture2D src, int width, int height)
        {
            Texture2D result = new Texture2D(src.width, src.height, TextureFormat.RGBA32, true);

            result.SetPixels(src.GetPixels());
            TextureScale.Bilinear(result, width, height);
            return(result);
        }
 public static void Rescale(this Texture2D tex, int width, int height)
 {
     TextureScale.Bilinear(tex, width, height);
 }