Skip to content

Commit c688e71

Browse files
I just fixed sprites 💀
1 parent 7913429 commit c688e71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/SpriteLoader.cs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,9 @@ private static void UICityRenderer_GetResource(ref GameObject __result, string b
504504

505505
public static Sprite BuildSprite(byte[] data, Vector2? pivot = null, float pixelsPerUnit = 2112f)
506506
{
507-
Texture2D texture = new(1, 1)
507+
Texture2D tempTexture = new(1, 1);
508+
tempTexture.LoadImage(data);
509+
Texture2D texture = new(tempTexture.width, tempTexture.height)
508510
{
509511
filterMode = FilterMode.Trilinear
510512
};

0 commit comments

Comments
 (0)