From a67fd18293b1ac30f706089241b96d637bf34ef9 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 11 Nov 2021 15:09:22 +0100 Subject: [PATCH 1/3] [unity] Fixed NaN issue when `SkeletonGraphic.MatchRectTransform()` is called after manual `Initialize()` without following `Update(0)`. --- .../Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs | 1 + 1 file changed, 1 insertion(+) 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 9cb9cab08..e796cd3de 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs @@ -412,6 +412,7 @@ namespace Spine.Unity { } public bool MatchRectTransformWithBounds () { + if (!wasUpdatedAfterInit) Update(0); UpdateMesh(); if (!this.allowMultipleCanvasRenderers) From fe635d9a79b84d3cff7e24014c951e012bdbb653 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 11 Nov 2021 17:33:03 +0100 Subject: [PATCH 2/3] [unity] Minor cosmetic: updated GameObject name in example scene according to changed example script name in commit 1517ffcd. --- .../Spine Examples/Other Examples/Instantiate from Script.unity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-unity/Assets/Spine Examples/Other Examples/Instantiate from Script.unity b/spine-unity/Assets/Spine Examples/Other Examples/Instantiate from Script.unity index be3fb983a..5432a019a 100644 --- a/spine-unity/Assets/Spine Examples/Other Examples/Instantiate from Script.unity +++ b/spine-unity/Assets/Spine Examples/Other Examples/Instantiate from Script.unity @@ -276,7 +276,7 @@ GameObject: - component: {fileID: 651278530} - component: {fileID: 651278529} m_Layer: 0 - m_Name: 2 DataAssets from Exports + m_Name: 2 RuntimeLoadFromExports m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 From 506a1abf536492a4864a21f5e2863cbbc27c8da8 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 15 Nov 2021 16:12:11 +0100 Subject: [PATCH 3/3] [unity] Fixed extension method `VertexAttachment.GetLocalVertices` ignoring deform timelines. Closes #1990. --- .../Spine/Runtime/spine-unity/Utility/SkeletonExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/SkeletonExtensions.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/SkeletonExtensions.cs index fb6564880..28e33639b 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/SkeletonExtensions.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/SkeletonExtensions.cs @@ -233,7 +233,7 @@ namespace Spine.Unity { buffer = buffer ?? new Vector2[bufferTargetSize]; if (buffer.Length < bufferTargetSize) throw new System.ArgumentException(string.Format("Vector2 buffer too small. {0} requires an array of size {1}. Use the attachment's .WorldVerticesLength to get the correct size.", va.Name, floatsCount), "buffer"); - if (va.Bones == null) { + if (va.Bones == null && va.DeformAttachment == null) { var localVerts = va.Vertices; for (int i = 0; i < bufferTargetSize; i++) { int j = i * 2;