From d6d0a4b60005b71a1339b55670e941dc2d61fdd9 Mon Sep 17 00:00:00 2001 From: Andrey Viktorov Date: Tue, 25 Jun 2013 17:15:24 +0700 Subject: [PATCH 1/2] Not relying only on first material anymore --- spine-tk2d/Code/tk2dSpineSkeleton.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/spine-tk2d/Code/tk2dSpineSkeleton.cs b/spine-tk2d/Code/tk2dSpineSkeleton.cs index 7ca777246..091c614cc 100644 --- a/spine-tk2d/Code/tk2dSpineSkeleton.cs +++ b/spine-tk2d/Code/tk2dSpineSkeleton.cs @@ -125,7 +125,6 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor } } - renderer.sharedMaterial = skeletonDataAsset.spritesData.inst.materials[0]; #if UNITY_EDITOR UpdateEditorGizmo(); #endif From 0b2a6bd2a5aa583cfbc1e2358ecec5f063872c7c Mon Sep 17 00:00:00 2001 From: Yonsh Date: Wed, 26 Jun 2013 14:49:02 +0900 Subject: [PATCH 2/2] Prevent mesh from temporary disappearing in Unity Editor --- spine-tk2d/Code/tk2dSpineSkeleton.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spine-tk2d/Code/tk2dSpineSkeleton.cs b/spine-tk2d/Code/tk2dSpineSkeleton.cs index 091c614cc..9e4463f41 100644 --- a/spine-tk2d/Code/tk2dSpineSkeleton.cs +++ b/spine-tk2d/Code/tk2dSpineSkeleton.cs @@ -139,6 +139,9 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor if (attachment is RegionAttachment) quadCount++; } +#if UNITY_EDITOR + if (mesh.subMeshCount == submeshIndices.Count) +#endif if (quadCount == cachedQuadCount) return; cachedQuadCount = quadCount;