From 3167747d73114d85f96d1d17ff8a87fb08770af7 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 18 Mar 2024 17:12:31 +0100 Subject: [PATCH] [unity] Fixed SkeletonGraphic Invalid AABB when instantiating in editor with no active attachments via drag and drop. Closes #2486. --- .../Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs | 4 ++-- spine-unity/Assets/Spine/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 5f94a7e58..e89362338 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs @@ -540,7 +540,7 @@ namespace Spine.Unity { if (mesh == null) { return false; } - if (mesh.vertexCount == 0) { + if (mesh.vertexCount == 0 || mesh.bounds.size == Vector3.zero) { this.rectTransform.sizeDelta = new Vector2(50f, 50f); this.rectTransform.pivot = new Vector2(0.5f, 0.5f); return false; @@ -572,7 +572,7 @@ namespace Spine.Unity { } } - if (!anyBoundsAdded) { + if (!anyBoundsAdded || combinedBounds.size == Vector3.zero) { this.rectTransform.sizeDelta = new Vector2(50f, 50f); this.rectTransform.pivot = new Vector2(0.5f, 0.5f); return false; diff --git a/spine-unity/Assets/Spine/package.json b/spine-unity/Assets/Spine/package.json index 45c7dccac..bd6c23df3 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.38", + "version": "4.1.39", "unity": "2018.3", "author": { "name": "Esoteric Software",