As Spine 4.1 has just been released, you can find the officially compiled Upgrade Guide for version 4.1 below.
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.unscaledTime parameter 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.
IHasRendererObject interface. Use
RendererObject property from RegionAttachment and MeshAttachment. Use
attachment.Region property instead.
Attachment.UpdateRegion. The caller must ensure that the attachment's region is not
AttachmentLoader.NewMeshAttachment() take an additional
VertexAttachment.DeformAttachment property has been replaced with
RegionAttachment.ComputeWorldVertices() takes a Slot instead of a Bone as the first argument.
Skeleton.Update(float deltaTime) method. Remove any occurrance of this call, it is no longer necessary.
Slot.AttachmentTime property. Remove any occurrance from your code.
Removed extension method
includeRotate (with default value
true). Most likely this method was never used with
includeRotate=false in user code.
AtlasRegion.PackedHeight are 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
OnRebuild callback delegate is now issued after the skeleton has been initialized, before the AnimationState component is initialized. This makes behaviour consistent with
SkeletonMecanim component behaviour. Use the new callback
OnAnimationRebuild if you want to receive a callback after the
SkeletonGraphic AnimationState has 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! 🙂