mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
16 lines
360 B
C#
16 lines
360 B
C#
using CUE4Parse_Conversion.Textures;
|
|||
|
|
using CUE4Parse.UE4.Assets.Exports.Texture;
|
||
|
|
|
||
|
|
namespace BlitzKit.CLI.Utils
|
||
|
|
{
|
||
|
|
public static class BlitzKitExporter
|
||
|
|
{
|
||
|
|
public static byte[] Texture2D(UTexture2D texture)
|
||
|
|
{
|
||
|
|
return texture
|
||
|
|
.Decode(ETexturePlatform.DesktopMobile)!
|
||
|
|
.Encode(ETextureFormat.Png, 100)
|
||
|
|
.ToArray();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|