- Đã chỉnh sửa
old 3.8 AnimationReferenceAssets cause 4.0 timeline to break
Hi,
my Unity project using Timeline was recently updated to Spine 4.0
migration went smoothly, but it seems I was using a referenceasset in one of my timelines that no longer exists in the spine project, but still exists as an asset in my unity project.
So when we updated our animations to 4.0 that one wasn't changed to 3.8
Unfortunately this has some annoying consequence when trying to open the timeline, because it causes some NullReferenceExceptions and as a result, the graph in its entirety can't load.
I thus can't fix the timeline by removing the clip referring to the obsolete asset.
I've had this kind of problem before, when my animator changed the name of some animations in the spine project. But I always managed to open the graph to fix it. This here is more problematic as I just can't fix the problem.
Hi again,
I made a temporary fix to AnimationReferenceAsset to work around the problem, just adding a null check in Initialize before calling FindAnimation
public void Initialize ()
{
if (skeletonDataAsset == null) return;
this.animation = skeletonDataAsset.GetSkeletonData(AnimationReferenceAsset.QuietSkeletonData)?.FindAnimation(animationName);
if (this.animation == null)
Debug.LogWarningFormat("Animation '{0}' not found in SkeletonData : {1}.", animationName, skeletonDataAsset.name);
}
That fixed the problem for me and allowed me to find out that I was referencing a legacy skeleton. This wasn't giving me any trouble prior to the 4.0 migration. I suppose the joke's on me in this case :-) still I think adding a null check after GetSkeletonData is definitely an improvement that should make its way into your next update.
Thanks for reporting and sorry for the troubles! We have added the null check in this commit, it will be published along with the next unitypackage.
Thanks Harald,
is there a way to stay informed of future releases?
FYI: A package containing this bugfix has already been released yesterday.
gofiguregames đã viếtis there a way to stay informed of future releases?
I will inform you, see above :nerd:. Joking aside, that's indeed a good question. You could use github's watch
feature on the spine-runtimes repository on github, but according to my knowledge this watch cannot be filtered for a subdirectory like spine-unity, thus getting other notifications as well. We don't have any notification feature for published unitypackages, usually I will write on the respective forum thread when a bug has been fixed and the respective unitypackage has been published. Typically a unitypackage is released within an hour after the commit, if changes are rather minor then it can be expected in the following 3 days.
Thanks a lot,
I really appreciate the awesome work you and Nate (and all the other invisible people behind it) are doing to make spine work as well as it does with Unity.
Thanks very much for your kind words, very much appreciated! :nerd:
We couldn't do it without users such as you, though: it helps a lot to receive precise problem descriptions, then we have an easy time to improve the Spine runtimes or Editor accordingly!