Skip to content

Commit

Permalink
Fix issue where card backs using sprites would be the wrong size when…
Browse files Browse the repository at this point in the history
… using the default card size
  • Loading branch information
jonagill committed Apr 1, 2023
1 parent 6a9c93e commit 2b86b10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Packages/com.jonagill.deckard/Runtime/DeckardCanvas.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.IO;
using UnityEditor;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
Expand Down Expand Up @@ -161,6 +157,12 @@ public Vector2 SafeZoneInches
}
}

private void Awake()
{
// Snap the RectTransform to its current size
EnforceCorrectConfiguration();
}

private void Start()
{
var dt = new DrivenRectTransformTracker();
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.jonagill.deckard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.jonagill.deckard",
"description": "A tool for using Unity's UI system to lay out and export decks of cards to PNG files, printable pages, and sprite atlases.",
"version": "0.1.12",
"version": "0.1.13",
"unity": "2019.2",
"displayName": "Deckard"
}

0 comments on commit 2b86b10

Please sign in to comment.