Skip to content

Commit

Permalink
Restore intentional sizing of cut markers
Browse files Browse the repository at this point in the history
  • Loading branch information
jonagill committed Mar 18, 2023
1 parent 6755665 commit c78fdf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Packages/com.jonagill.deckard/Runtime/DeckAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,11 @@ private static RectTransform InstantiateCutMarkers(DeckardCanvas cardRoot, Trans
{
var cutMarkersPrefab = Resources.Load<RectTransform>("[CutMarkers]");
var cutMarkersInstance = Instantiate(cutMarkersPrefab, parent, false);

var cardSizeUnits = cardRoot.ContentSizeUnits;
cutMarkersInstance.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, cardSizeUnits.x);
cutMarkersInstance.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, cardSizeUnits.y);

return cutMarkersInstance;
}

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.8",
"version": "0.1.9",
"unity": "2019.2",
"displayName": "Deckard"
}

0 comments on commit c78fdf1

Please sign in to comment.