From a8f400b9bff452ef11873a546710ba0e294723f6 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Wed, 7 Feb 2024 20:59:11 +0100 Subject: [PATCH] [unity] Fixed incomplete bugfix commit b3aa3e0 regarding GetRepackedSkin issue with 270 degree rotation polygon packing and non-square atlas. See #2445. --- .../Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs | 2 +- spine-unity/Assets/Spine/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs index 1587ff414..0e9a6366f 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs @@ -743,7 +743,7 @@ namespace Spine.Unity.AttachmentTools { // at a 270 degree region, u2/v2 deltas and atlas width/height are swapped, and delta-v is negative. float du = uvRect.width; // u2 - u; float dv = uvRect.height; // v - v2; - float atlasAspectRatio = page.width / page.height; + float atlasAspectRatio = (float)page.width / (float)page.height; u2 = u + (dv / atlasAspectRatio); v2 = v - (du * atlasAspectRatio); } diff --git a/spine-unity/Assets/Spine/package.json b/spine-unity/Assets/Spine/package.json index 4a4956a2b..bc10d3828 100644 --- a/spine-unity/Assets/Spine/package.json +++ b/spine-unity/Assets/Spine/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.spine-unity", "displayName": "spine-unity Runtime", "description": "This plugin provides the spine-unity runtime core.", - "version": "4.1.35", + "version": "4.1.36", "unity": "2018.3", "author": { "name": "Esoteric Software",