mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: capture some error
This commit is contained in:
1 parent
99f41b9805
commit
1776c8fc15
2 files changed
+15
-8
No files matched your search
Vendored
+1
@@ -192,6 +192,7 @@
|
||||
"searchplayers",
|
||||
"searchtanks",
|
||||
"SHAREDEXP",
|
||||
"Skia",
|
||||
"SKLLD",
|
||||
"sluggify",
|
||||
"smoothstep",
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user