From 255bc753d175fd4a6c4da1936626e7f5862c879e Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 28 Jan 2019 16:28:28 +0100 Subject: [PATCH] [unity] Fixed SkeletonGraphic's 'Starting Animation' property being cleared upon saving under some circumstances, closes #1252. --- .../spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs index 620d2d940..bb666e21f 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs @@ -72,7 +72,6 @@ namespace Spine.Unity { } else if (skeletonDataAsset.GetSkeletonData(true) != skeleton.data) { Clear(); Initialize(true); - startingAnimation = ""; if (skeletonDataAsset.atlasAssets.Length > 1 || skeletonDataAsset.atlasAssets[0].MaterialCount > 1) Debug.LogError("Unity UI does not support multiple textures per Renderer. Your skeleton will not be rendered correctly. Recommend using SkeletonAnimation instead. This requires the use of a Screen space camera canvas."); } else { @@ -275,6 +274,9 @@ namespace Spine.Unity { } #endif } + else { + startingAnimation = string.Empty; + } } }