From b9b6e0d352d73437caecba1398c841c398360dce Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 7 Mar 2024 17:20:44 +0100 Subject: [PATCH] [unity] Fixed Leftover AnimationState applied when calling Initialize(true). Closes #2475. --- .../Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs index 087dabd760..96f7e7ca1e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs @@ -184,6 +184,7 @@ public override void Initialize (bool overwrite, bool quiet = false) { if (BuildUtilities.IsInSkeletonAssetBuildPreProcessing) return; #endif + state = null; // prevent applying leftover AnimationState base.Initialize(overwrite, quiet); if (!valid)