EDIT: The title is no longer the root cause of this issue.

When I play an animation in spine everything looks good, the sword comes down and the collider enables and then disables on its way back up. It also looks good in preview mode unless you hit idle or another animation that has no framing info at all regarding the collider. What I see happening is after an attack and transition to idle for some reason the collider is remaining.

I thought maybe this was due to instantiating as mecanim but I can reproduce it in the preview mode if I change animations during an attack etc.

I was able to fix the issue by hard setting the weapon bounding box to disabled in frame 0 of my idle animation, but obviously you wouldn't expect to have to do that for every animation.

Is this possibly due to exit time settings or anything else not transitioning out properly from where the collider would get disabled?

Edit: Moving the bounding box to disable way earlier in the animation does seem to have some sort of impact, so I don't think it's always reaching the frame properly in the mecanim transitions. Is there a guideline for doing mixing or exit times to make sure things flow correctly?

-- 19 Sep 2015, 11:38 --

Mitch I think I narrowed down the problem here. Any time I export and import my animation I'm getting this error and it is not updating my Attack animation. I was able to verify because the animation clip in the controller that is built is half the length it should be. We updated it recently and so what I did was delete the mecanim controller from the spine data and rename the old, then do a Generate Mecanim Controller on it and the Attack animation clip is much longer and plays as it should.

The data is correct in the animation info, it says Attack ... duration 1.000s (30) but in the Attack mecanim clip it is
only .23 seconds.

Edit: Same issue as this: List of Animation Clips Suddenly Stopped Updating Itself
Edit 2: Resolved the issue as described at the end of the above post but not sure if it's a solid fix or not.

ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,UnityEngine.AnimationClip].Add (System.String key, UnityEngine.AnimationClip value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
SkeletonBaker.GenerateMecanimAnimationClips (.SkeletonDataAsset skeletonDataAsset) (at Assets/spine-unity/Editor/SkeletonBaker.cs:405)
SkeletonDataAssetInspector.DrawMecanim () (at Assets/spine-unity/Editor/SkeletonDataAssetInspector.cs:140)
SkeletonDataAssetInspector.DrawUnityTools () (at Assets/spine-unity/Editor/SkeletonDataAssetInspector.cs:158)
SkeletonDataAssetInspector.OnInspectorGUI () (at Assets/spine-unity/Editor/SkeletonDataAssetInspector.cs:119)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1162)
  • Posts: 197

Return to Unity