feat: capture some error

This commit is contained in:
TrèsAbhi committed 2026-02-02 19:57:15 -06:00
1 parent 99f41b9805
commit 1776c8fc15
2 files changed
+15 -8

No files matched your search

+1
View File
@@ -192,6 +192,7 @@
"searchplayers",
"searchtanks",
"SHAREDEXP",
"Skia",
"SKLLD",
"sluggify",
"smoothstep",
+14 -8
View File
@@ -44,14 +44,20 @@ public class GameInterface
if (provider.TryLoadPackageObject<UPrimaryDataAsset>(path, out var pda))
{
var bigIcon = pda.Get<FSoftObjectPath>("BigIcon").Load<UTexture2D>();
Console.WriteLine(bigIcon.Format);
Console.WriteLine(bigIcon.GetType());
bigIcon.Decode(ETexturePlatform.DesktopMobile);
return [];
try
{
return pda.Get<FSoftObjectPath>("BigIcon")
.Load<UTexture2D>()
.Decode(ETexturePlatform.DesktopMobile)!
.ToSkBitmap()
.Encode(SkiaSharp.SKEncodedImageFormat.Webp, 80)
.ToArray();
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
else
{