Re-exporting skeletons and upgrading the spine-unity runtime files
Please check out the spine-unity documentation sections below:
spine-unity Runtime Documentation: Updating the spine unity Runtime
spine-unity Runtime Documentation: Updating an Extension UPM Package
They describe necessary steps like re-exporting your skeletons, upgrading across multiple spine-unity versions and how to safely upgrade the spine-unity runtime files.
Adapting your code to 4.1 API changes
For notable changes to the API, please see the Changelog, sections
Some methods have been renamed or replaced in 4.1.
If you receive compile errors from your own code because of using renamed and no-longer existing methods, the following points from the changelog will help to perform the required steps to your own code to make it compatible again:
SkeletonGraphic.unscaledTimeparameter protected. Use the new property
attachment.Region = region; if (update) attachment.UpdateRegion()instead.
The following list covers breaking changes to inner parts, which users typically do not access. Most likely these were never used in user code, so no changes should be necessary.
Attachment.UpdateRegion. The caller must ensure that the attachment's region is not
AttachmentLoader.NewMeshAttachment()take an additional
VertexAttachment.DeformAttachmentproperty has been replaced with
Slotinstead of a
Boneas the first argument.
Skeleton.Update(float deltaTime)method. Remove any occurrance of this call, it is no longer necessary.
Slot.AttachmentTimeproperty. Remove any occurrance from your code.
- Removed extension method
includeRotate(with default value
true). Most likely this method was never used with
includeRotate=falsein user code.
AtlasRegion.PackedHeightare swapped compared to 4.0 when packing rotation is equal to 90 degrees.
Changes in behaviour from 4.0 to 4.1
For a full list of changes in behaviour, please again see the Changelog, sections
OnRebuildcallback delegate is now issued after the skeleton has been initialized, before the
AnimationStatecomponent is initialized. This makes behaviour consistent with
SkeletonMecanimcomponent behaviour. Use the new callback
OnAnimationRebuildif you want to receive a callback after the
AnimationStatehas been initialized.
You can download the new unitypackages from the download page: spine-unity Download
If you find anything that should be noted or added to the guide, please do not hesitate to post it below so that we can make upgrading as easy and painless as possible for everyone.
We hope that you like the new Spine release and are able to create even more incredible games with it!