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