Skip to content

Commit

Permalink
Patch component insertion
Browse files Browse the repository at this point in the history
update to version 1.1.9
fix wiring issues
update component insertion
  • Loading branch information
sjsanjsrh authored and astralchan committed May 2, 2024
1 parent dc4c341 commit 790f7f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions GifImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class GifImporter : ResoniteMod
{
public override string Name => "GifImporter";
public override string Author => "astral";
public override string Version => "1.1.8";
public override string Version => "1.1.9";
public override string Link => "https://github.com/astralchan/GifImporter";

[AutoRegisterConfigKey]
Expand Down Expand Up @@ -205,12 +205,13 @@ public static bool Prefix(ref Task __result, ImportItem item, Slot targetSlot, f
_TimeIntDriver.Target.Target = _UVAtlasAnimator.Frame;
_UVAtlasAnimator.AtlasInfo.Target = _AtlasInfo;

QuadMesh _QuadMesh = targetSlot.GetComponent<QuadMesh>();
_QuadMesh.Size.Value = new float2(frameWidth, frameHeight).Normalized;
TextureSizeDriver _TextureSizeDriver = targetSlot.GetComponent<TextureSizeDriver>();
_TextureSizeDriver.Premultiply.Value = new float2(gifRows, gifCols);

UnlitMaterial _UnlitMaterial = targetSlot.GetComponent<UnlitMaterial>();
_UVAtlasAnimator.ScaleField.Target = _UnlitMaterial.TextureScale;
_UVAtlasAnimator.OffsetField.Target = _UnlitMaterial.TextureOffset;
_UnlitMaterial.BlendMode.Value = BlendMode.Cutout;

// Set inventory preview to first frame
ItemTextureThumbnailSource _inventoryPreview = targetSlot.GetComponent<ItemTextureThumbnailSource>();
Expand Down

0 comments on commit 790f7f4

Please sign in to comment.