/// <summary> /// 图像缩放 /// </summary> /// <param name="texture"></param> /// <param name="path"></param> /// <param name="width"></param> /// <param name="height"></param> public static void AdjustScale(this Texture2D texture, string path, int width, int height) { var result = TextureHelper.AdjustScale(texture, width, height); File.WriteAllBytes(path, result.EncodeToPNG()); }