- Modifié
Update Error: `DynamicSpineBone.UpdateLocal(SkeletonRenderer
I imported the newest Unity spine package. The current error I am suck on after the upgrade is this:
Assets/spin-examples/Scripts/DynamicSpineBone.cs(43,35): error CS0123: A method or delegate
DynamicSpineBone.UpdateLocal(SkeletonRenderer)' parameters do not match delegate
UpdateBonesDelegate(ISkeletonAnimation)' parameters
The offending line is this:
skeletonAnimation.UpdateLocal += UpdateLocal;
Inside of DynamicSpineBone.
Thoughts?
P.S. Commenting them out seems to lead to a cascade of errors. Is there any update guide or notes I missed? I think the version I am updating from has some legacy files that are remaining that shouldnt?
Yeah, I don't know what a DynamicSpineBone is. I don't think that's existed in a while.
Since it's in examples though, you could get rid of it and everything will work. Unless you're using it.
In which case, the error just says the delegate signature has changed from MethodName(SkeletonRenderer) to MethodName(ISkeletonAnimation).
So if you have anything that's subscribing to it, you should change the method signature there.
In this case, you should change DynamicSpineBone.UpdateLocal's parameter's type from SkeletonRenderer
to ISkeletonAnimation
I did a clean install (deleted all spine folders and imported new ones) and now I have a new error:
Error reading skeleton JSON file for SkeletonData asset: skeleton_SkeletonData
Invalid timeline type for a bone: flipX (backUpperArm)
at Spine.SkeletonJson.ReadAnimation (System.String name, System.Collections.Generic.Dictionary`2 map, Spine.SkeletonData skeletonData) [0x00584]
Do I need to re-export all my spines or something? (ps. I dont work with the spine animations I have an artist to who does)
Yeah, you have to re-export and replace all the flips with negative scale.
Even if the runtime ignored those flip timelines, they would not work correctly in Spine 3.0 and 3.1 because of that.
If you've already done a lot of work and used a lot of flipX, especially if you don't have access to the original spine files, you may have to stay with 2.1.
You can find a copy of the Spine-Unity 2.1 runtime here: http://esotericsoftware.com/files/runtimes/unity/spine-unity-v2.unitypackage
Gotcha
Ya we did a fair bit but its well worth our time to update them.
Thanks a bunch for the help ^_^