From dd81e4b0629cad4571619c877609357e2fd697c1 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 12 Dec 2023 13:36:38 +0100 Subject: [PATCH] [unity] Fixed SkeletonGraphic newly added SkeletonSubmeshGraphic having wrong offset. Closes #2433. --- .../Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs | 4 ++++ spine-unity/Assets/Spine/package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs index 90d7529de..5f94a7e58 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs @@ -1001,6 +1001,10 @@ namespace Spine.Unity { SkeletonSubmeshGraphic submeshGraphic = go.AddComponent(); submeshGraphic.maskable = this.maskable; submeshGraphic.raycastTarget = false; + submeshGraphic.rectTransform.pivot = rectTransform.pivot; + submeshGraphic.rectTransform.anchorMin = Vector2.zero; + submeshGraphic.rectTransform.anchorMax = Vector2.one; + submeshGraphic.rectTransform.sizeDelta = Vector2.zero; submeshGraphics.Add(submeshGraphic); } } diff --git a/spine-unity/Assets/Spine/package.json b/spine-unity/Assets/Spine/package.json index 3d041d61c..5482740ec 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.31", + "version": "4.1.32", "unity": "2018.3", "author": { "name": "Esoteric Software",