- Additions
- Added physics support
- Added
spPhysicsConstraintTimeline
andspPhysicsConstraintResetTimeline
- Added
spPhysics
to be passed tospSkeleton_updateWorldTransform()
- Added
spSkeletonData_findPhysicsConstraint()
to query a physics constraint by name - Added
spSkeleton_findPhysicsConstraint()
to query a physics constraint by name - Added
spSkeleton_physicsTranslate()
to translate all physics constraints by some distances in the skeleton coordinate system - Added
spSkeleton_physicsRotate()
to rotate all physics constraints by some distances in the skeleton coordinate system - Added
spSkeleton::time
to keep track of time for physics simulations - See also breaking changes for
spSkeleton_updateWorldTransform()
and the requirement to callspSkeleton_update()
to advance pyhsics each frame.
- Added
- Added
spInheritTimeline
- Added
spTrackEntry::alphaAttachmentThreshold
- Removed
const
qualifiers where appropriate - Added
spTrackEntry_setMixDuration()
to set the mix duration in conjunction with a delay - Added
spTrackEntry_wasApplied()
to check if the entry has been applied - Added
spBone_worldToParent()
to transform coordinates from world space to the parent space of a bone - Added
spBone_localToParent()
to transform coordinates from a bone's local space to its parent space - Added non essential fields
icon
andvisible
tospBoneData
- Added non essential fields
path
andvisible
tospSlotData
- Added physics support
- Breaking changes
- Renamed
spTrackEntry::attachmentThreshold
tospTrackEntry::mixAttachmentThreshold
- Renamed
spTrackEntry::drawOrderThreshold
tospTrackEntry::mixDrawOrdertThreshold
- Renamed
spTransformMode
tospInherit
and allSP_TRANSFORMMODE_*
enums toSP_INHERIT_*
- Changed
spMeshAttachment::edges
fromint *
tounsigned short *
- You must call
spSkeleton_update(delta)
before callingspSkeleton_updateWorldTransform()
if the frame time has advanced. This is needed to update physics accordingly spSkeleton_updateWorldTransform()
takes an additionalspPhysics
parameter. See thespPhysics
documentation for information on what the different enum values do
- Renamed
- Added physics examples
SkeletonDrawable::update()
now takes an additionalspPhysics physics
parameter that specifies how physics should be updated
spSkeletonDrawable_update()
now takes an additionalspPhysics physics
parameter that specifies how physics should be updated
- Added physics support
- Added
PhysicsConstraintXXXTimeline
andPhysicsConstraintResetTimeline
- Added
Physics
to be passed toSkeleton::updateWorldTransform()
- Added
SkeletonData::findPhysicsConstraint()
andSkeletonData::getPhysicsConstraints()
to query physics constraints - Added
Skeleton::findPhysicsConstraint()
andSkeleton::getPhysicsConstraints()
to query physics constraints - Added
Skeleton::physicsTranslate()
to translate all physics constraints by some distances in the skeleton coordinate system - Added
Skeleton::physicsRotate()
to rotate all physics constraints by some distances in the skeleton coordinate system - Added
Skeleton::time
to keep track of time for physics simulations - See also breaking changes for
Skeleton::updateWorldTransform()
and the requirement to callSkeleton::update()
to advance pyhsics each frame.
- Added
- Added
InheritTimeline
- Added
TrackEntry::_alphaAttachmentThreshold
- Added
TrackEntry::setMixDuration()
to set the mix duration in conjunction with a delay - Added
TrackEntry::wasApplied()
to check if the entry has been applied - Added
Bone::worldToParent()
to transform coordinates from world space to the parent space of a bone - Added
Bone::localToParent()
to transform coordinates from a bone's local space to its parent space - Added non essential fields
icon
andvisible
toBoneData
- Added non essential fields
path
andvisible
toSlotData
- Added
setToSetupPose()
to all contraint classes - Breaking changes
- Renamed
TrackEntry::attachmentThreshold
toTrackEntry::mixAttachmentThreshold
- Renamed
TrackEntry::drawOrderThreshold
toTrackEntry::mixDrawOrdertThreshold
- Renamed
TransformMode
toInherit
and allTransformMode_*
enums toInherit_*
- You must call
Skeleton::update(delta)
before callingSkeleton::updateWorldTransform()
if the frame time has advanced. This is needed to update physics accordingly Skeleton::updateWorldTransform()
takes an additionalPhysics
parameter. See thePhysics
documentation for information on what the different enum values do- All
Updatable
sub-classes likeBone
and constraints now take an additionalPhysics
parameter for theirupdate()
methods
- Renamed
- Added physics example
- Improved build system and build documentation
SkeletonDrawable::update()
now takes an additionalPhysics physics
parameter that specifies how physics should be updated
SkeletonDrawable::update()
now takes an additionalPhysics physics
parameter that specifies how physics should be updated
- Breaking: Renamed runtime folder from
spine-ue4
tospine-ue
- Breaking: Renamed plugin
SpinePlugin
. You must update your project'sBuild.cs
file accordingly - Breaking: Starting with Unreal Engine 5.3 imported
.skel
/.json
and.atlas
files in the same folder must NOT have a common prefix. E.g.skeleton.json
andskeleton.atlas
will not work. Make sure to rename at least one of the two files so there is no prefix collision, e.g.skeleton-data.json
andskeleton.atlas
. - Added compatibility with UE 5.3
- Added more example maps
- Added blueprint-callable methods
PhysicsTranslate()
,PhysicsRotate()
andResetPhysicsConstraints()
(which will reset all physics constraints in the skeleton) toSpineSkeletonComponent
andSpineWidget
.
- Breaking: Renamed
TrackEntry.set_attachment_threshold
andTrackEntry.get_attachment_threshold
toTrackEntry.set_mix_attachment_threshold
andTrackEntry.get_mix_attachment_threshold
- Breaking: Renamed
TrackEntry.set_draw_order_threshold
andTrackEntry.get_draw_order_threshold
toTrackEntry.set_mix_draw_order_threshold
andTrackEntry.get_mix_draw_order_threshold
- BReaking:
SpineSkeleton.update_world_transform
takes an additionalphysics
parameter that specifies how physics should be updated - Added compatibility for Godot 4.1, 4.2 and C#, see builds at https://esotericsoftware.com/spine-godot
- Added physics examples
- Added
SpineBone.world_to_parent
to transform coordinates from world space to the parent space of a bone - Added
SpineBone.local_to_parent
to transform coordinates from a bone's local space to its parent space - Physics support
- Added
SpineBone.get_inherit
/SpineBone.set_inherit
- Added
SpinePhysicsConstraint
andSpinePhysicsConstraintData
- Added
SpineSkeleton.update()
to advance the physics time - ADded
SpineSkeleton.get_time
/SpineSkeleton.set_time
to access the physics time - Added
SpineSkeleton.physics_translate()
to translate all physics constraints by some distances in the skeleton coordinate system - Added
SpineSkeleton.physics_rotate()
to rotate all physics constraints by some distances in the skeleton coordinate system - Added
SpineSkeleotnDataResource.set_reference_scale
/SpineSkeletonDataResource.get_reference_scale
to access the reference scale of the loaded skeleton data
- Added
- Added
TrackEntry.set_alpha_attachment_threshold
- Added
TrackEntry.set_mix_duration_and_delay()
to set the mix duration in conjunction with a delay - Added
TrackEntry::was_applied()
to check if the entry has been applied
-
Additions
-
Breaking changes
- Renamed
TrackEntry
AttachmentThreshold
toMixAttachmentThreshold
, renamedDrawOrderThreshold
toMixDrawOrderThreshold
. - Changed signature of
Skeleton.UpdateWorldTransform()
toUpdateWorldTransform(Skeleton.Physics physics)
. The default replacement forskeleton.UpdateWorldTransform()
calls isskeleton.UpdateWorldTransform(Skeleton.Physics.Update)
. If you are certain that a subsequent call toskeleton.UpdateWorldTransform(Skeleton.Physics.Update)
follows in the same frame, you can passSkeleton.Physics.Pose
as argument instead ofSkeleton.Physics.Update
.
- Renamed
-
Officially supported Unity versions are 2017.1-2023.1.
-
Additions
OnPostProcessVertices
callback parameterMeshGeneratorBuffers
now provides access touv2Buffer
anduv3Buffer
properties ofMeshGenerator
, automatically allocating buffers upon access iftintBlack
is disabled. This allows for passing own vertex data to a shader on second and third uv channels.- Added
Spine/SkeletonGraphic Grayscale
shader to provide a basic grayscale shader for SkeletonGraphic as well. SkeletonGraphic MaterialSkeletonGraphicDefaultGrayscale
uses this shader and can be assigned atSkeletonGraphic
components as usual. SkeletonGraphic
now supports automatic scaling based on itsRectTransform
bounds. Automatic scaling can be enabled by setting the addedLayout Scale Mode
Inspector property to eitherWidth Controls Height
,Height Controls Width
,FitInParent
orEnvelopeParent
. It is set toNone
by default to keep previous behaviour and avoid breaking existing projects. To modify the reference layout bounds, hit the additionalEdit Layout Bounds
toggle button to switch into edit mode, adjust the bounds or hitMatch RectTransform with Mesh
, and hit the button again when done adjusting. The skeleton will now be scaled accordingly to fit the reference layout bounds to the object'sRectTransform
.- Added previously missing unlit URP 2D shader variant, available under
Universal Render Pipeline/2D/Spine/Skeleton
. - Added support for light cookies at
Universal Render Pipeline/Spine/Sprite
shader. - Timeline extension package: An additional Spine preferences parameter
Timeline
-Default Mix Duration
has been added, setting newly addedSpineAnimationStateClip
clips accordingly, defaults to false. This Spine preferences parameter can be enabled to default to the previous behaviour before this update. - Tint Black: Added support for Tint Black functionality at all Spine URP shaders (2D and 3D shaders) and at all standard pipeline
Spine/Sprite
shaders. This feature can be enabled via theTint Black
material parameter in the Inspector. Note: The URP Sprite shaders provided in the Spine URP Shaders extension UPM package require the latest version of the spine-unity runtime (package version 4.1.12, 2023-05-31 or newer) to display the added material parameters in the Inspector GUI. - Added
SkeletonGraphic.MeshScale
property to allow access to calculated mesh scale.MeshScale
is based on (1) Canvas pixels per unit, and (2)RectTransform
bounds when usingLayout Scale Mode
other thanNone
atSkeletonGraphic
which scales the skeleton mesh to fit the parentRectTransform
bounds accordingly. - Added
updateSeparatorPartScale
property toSkeletonGraphic
to let render separator parts follow the scale (lossy scale) of theSkeletonGraphic
GameObject. Defaults tofalse
to maintain existing behaviour. - Added experimental
EditorSkeletonPlayer
component to allow Editor playback of the initial animation set atSkeletonAnimation
orSkeletonGraphic
components. Add this component to your skeleton GameObject to enable the in-editor animation preview. Allows configurations for continuous playback when selected, deselected, and alternative single-frame preview by settingFixed Track Time
to any value other than 0. Limitations: At skeletons with variable material count the Inspector preview may be too unresponsive. It is then recommended to disable theEditorSkeletonPlayer
component (at the top of the Inspector) to make it responsive again, then you can disablePlay When Selected
and re-enable the component to preview playback only when deselected. - Added example component
RenderCombinedMesh
to render a combined mesh of multiple meshes or submeshes. This is required byOutlineOnly
shaders to render a combined outline when usingSkeletonRenderSeparator
or multiple atlas pages which would normally lead to outlines around individual parts. To add a combined outline to your SkeletenRenderer:- Add a child GameObject and move it a bit back (e.g. position Z = 0.01).
- Add a
RenderCombinedMesh
component, provided in theSpine Examples/Scripts/Sample Components
directory. - Copy the original material, add _Outline to its name and set the shader to your outline-only shader like
Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly
orSpine/Outline/OutlineOnly-ZWrite
. - Assign this _Outline material at the new child GameObject's
MeshRenderer
component. If you are usingSkeletonRenderSeparator
and need to enable and disable theSkeletonRenderSeparator
component at runtime, you can increase theRenderCombinedMesh
Reference Renderers
array by one and assign theSkeletonRenderer
itself at the last entry after the parts renderers. DisabledMeshRenderer
components will be skipped when combining the final mesh, so the combined mesh is automatically filled from the desired active renderers.
- Timeline extension package: Added static
EditorEvent
callback to allow editor scripts to react to animation events outside of play-mode. Register to the events viaSpine.Unity.Playables.SpineAnimationStateMixerBehaviour.EditorEvent += YourCallback;
. - URP Shaders: Added
Depth Write
property to shadersUniversal Render Pipeline/Spine/Skeleton
andUniversal Render Pipeline/Spine/Skeleton Lit
. Defaults to false to maintain existing behaviour. - Added
Animation Update
mode (calledUpdateTiming
in code)In Late Update
forSkeletonAnimation
,SkeletonMecanim
andSkeletonGraphic
. This allows you to update theSkeletonMecanim
skeleton in the same frame that the Mecanim Animator updated its state, which happens betweenUpdate
andLateUpdate
. - URP Shaders: Added URP "Blend Mode" shader variants for both URP 3D and URP 2D renderers. They are listed under shader name "Universal Render Pipeline/Spine/Blend Modes/" and "Universal Render Pipeline/2D/Spine/Blend Modes/" respectively.
- URP Shaders: Added support for Tint Black functionality at "Blend Modes" Spine URP shaders (2D and 3D shaders).
- PhysicsConstraints: Skeleton GameObjects now automatically apply Transform translation and rotation to the skeleton's
PhysicsConstraints
. You can disable applying translation or rotation at the Skeleton component Inspector underAdvanced - Physics Inheritance
by settingPosition
to (0,0)andRotation
to 0, or by setting the propertiesphysicsPositionInheritanceFactor
toVector2.zero
andphysicsRotationInheritanceFactor
to0
at the skeleton component via code. - Added
Physics Constraints
example scene (located inSpine Examples/Other Examples
) together withcelestial-circus
example skeleton assets. This scene demonstrates Transform movement automatically affecting physics constraints of a skeleton. - PhysicsConstraints: Skeleton components now allow you to use relative instead of world-space Transform movement by assigning a Transform (typically the parent) to the new
Movement relative to
property. Leave this property atnull
(the default) to use world-space Transform movement for physics. - PhysicsConstraints: Added Spine Preferences settings
Editor Instantiation
-Physics Inheritance
-Default Position
andDefault Rotation
to initialize skeletons physics settings with the desired Transform position and rotation inheritance factors when added to a scene via drag-and-drop. - SkeletonGraphic: Added Tint Black blend mode shaders
Spine/SkeletonGraphic Tint Black Additive
,Spine/SkeletonGraphic Tint Black Multiply
andSpine/SkeletonGraphic Tint Black Screen
. - SkeletonGraphic: Added pre-defined SkeletonGraphic material sets for main workflow parameters in folders
spine-unity/Materials
instead of requiring manual copies:SkeletonGraphic-PMATexture
containing materials for premultiplied-alpha texture workflow (Straight Alpha Texture
disabled) andSkeletonGraphic-StaightAlphaTexture
containing materials for straight alpha texture workflow (Straight Alpha Texture
enabled). These directories contain a set of materials withCanvasGroup Compatible
disabled for usage withAdvanced - PMA Vertex Color
enabled at the component. Each directory also provides a subdirectoryCanvasGroupCompatible
with materials withCanvasGroup Compatible
enabled for usage withCanvasGroup
alpha (requiringAdvanced - PMA Vertex Color
disabled at the component). - SkeletonGraphic: Added auto-detect functionality for parameters
Advanced
-Tint Black
,CanvasGroup Compatible
andPMA Vertex Color
. If unsure which settings are correct, hit theDetect
button next to each parameter, in top to bottom order, or theDetect Settings
to detect all three. Also added automatic material assignment via aDetect Material
button in theAdvanced
section and aDetect
button next to theMaterial
property at the top of the component Inspector, as well as next to theBlend Mode Materials
section when using multiple canvas renderers with blend modes. The suitable material is selected based on these three settings, combined with texture settings (PMA or straight alpha texture settings). If you receive incorrect results, likely your texture settings are incorrectly setup for your PMA or Straight alpha texture export settings. SkeletonRenderTexture
example components now provide ashaderPasses
parameter to customize which passes are rendered to theRenderTexture
. It defaults to-1
for all passes to keep the existing behaviour. You might want to set it to0
to only render the first pass e.g. to avoid issues when using a URP shader at the original skeleton.SkeletonGraphicRenderTexture
example component now also received aquadMaterial
property, defaulting to the newly added Material assetRenderQuadGraphicMaterial
which applies proper premultiplied-alpha blending of the render texture. ThequadMaterial
member variable was moved fromSkeletonRenderTexture
to the common base classSkeletonRenderTextureBase
.- All Spine Outline shaders, including the URP outline shader, now provide an additional parameter
Width in Screen Space
. Enable it to keep the outline width constant in screen space instead of texture space. Requires more expensive computations, so enable only where necessary. Defaults todisabled
to maintain existing behaviour. - Added support for BlendModeMaterials at runtime instantiation from files via an additional method
SkeletonDataAsset.SetupRuntimeBlendModeMaterials
. See example sceneSpine Examples/Other Examples/Instantiate from Script
for a usage example. - SkeletonGraphic: You can now offset the skeleton mesh relative to the pivot via a newly added green circle handle. This allows you to e.g. frame only the face of a skeleton inside a masked frame. Previously offsetting the pivot downwards fails when
Layout Scale Mode
scales the mesh smaller and towards the pivot (e.g. the feet) and thus out of the frame. Now you can keep the pivot in the center of theRectTransform
while offsetting only the mesh downwards, keeping the desired skeleton area (e.g. the face) centered while resizing. Moving the new larger green circle handle moves the mesh offset, while moving the blue pivot circle handle moves the pivot as usual. Universal Render Pipeline/Spine/Skeleton
shader now performs proper alpha-testing whenDepth Write
is enabled, using the existingShadow alpha cutoff
parameter.SkeletonRootMotion
components now provide a publicInitialize()
method which is automatically called when callingskeletonAnimation.Initialize(true)
to update the necessary skeleton references. If a different root bone shall be used, be sure to setskeletonRootMotion.rootMotionBoneName
before callingskeletonAnimation.Initialize(true)
.- Skeleton Mecanim: Added new
Mix Mode
Match
. When selected, Spine animation weights are calculated to best match the provided Mecanim clip weights. This mix mode is recommended on any layer using blend tree nodes. - URP Shaders: Added
ZWrite
variant of outline shaderUniversal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly ZWrite
. Suitable for e.g. depth of field (DoF) effect where writing to the depth buffer is required. Note that for DoF effect,Render Queue
needs to be set toAlpha Test
.
-
Breaking changes
- Changed
SpineShaderWithOutlineGUI
outline related methods fromprivate
toprotected virtual
to allow for custom shader GUI subclasses to switch to different outline shaders. - Changed
BoneFollower
andBoneFollowerGraphic
methodsLateUpdate
andInitialize
tovirtual
to allow easier overriding for e.g. positional offset in custom subclasses. MeshGenerator
received a new optimization option to avoid rendering fully transparent attachments at slot alpha 0 by default. Comment out#define SLOT_ALPHA_DISABLES_ATTACHMENT
inMeshGenerator.cs
to revert to previous behaviour. You may only need this option disabled when utilizing a custom shader which uses vertex color alpha for purposes other than transparency.- PhysicsConstraints: bool properties
ApplyTranslationToPhysics
andApplyRotationToPhysics
were changed toVector2 PhysicsPositionInheritanceFactor
andfloat PhysicsRotationInheritanceFactor
to allow the Transform movement the be scaled by a factor before being applied to the skeleton. You can set the properties toVector2.zero
and0
respectively to disable applying any Transform movement at all. TheAdvanced
Inspector sectionPhysics Constraints
was renamed toPhysics Inheritance
, the properties in the section are now calledPosition
andRotation
. - SkeletonGraphic Materials: Since the addition of new material sets for the
CanvasGroupCompatible
parameters, the default SkeletonGraphic materials all haveCanvasGroup Compatible
disabled. Please assign the respective material from theCanvasGroupCompatible
material subdirectory if you wantCanvasGroup Compatible
enabled at your SkeletonGraphic. - SkeletonGraphic: The parameter
SkeletonGraphic.MeshGenerator.settings.canvasGroupTintBlack
was changed tocanvasGroupCompatible
to help with auto-detecting correct Vertex Data and Material settings. Set the parameter to true if the SkeletonGraphic component is located below aCanvasGroup
component. The parameter value is automatically migrated fromcanvasGroupTintBlack
. - Inspector: String attribute
SpineSkin()
now allows to include<None>
in the list of parameters. Previously theincludeNone=true
parameter of theSpineSkin()
attribute defaulted totrue
but was ignored. Now it defaults tofalse
and has an effect on the list. Only the Inspector GUI is affected by this behaviour change. SkeletonGraphicRenderTexture
example component:protected RawImage quadRawImage
was changed toprotected SkeletonSubmeshGraphic quadMaskableGraphic
for a bugfix. This is only relevant for subclasses ofSkeletonGraphicRenderTexture
or when querying theRawImage
component via e.g.skeletonGraphicRenderTexture.quad.GetComponent<RawImage>()
.- Fixed a bug where when Linear color space is used and
PMA vertex colors
enabled, additive slots add a too dark (too transparent) color value. If you want the old incorrect behaviour (darker additive slots) or are not using Linear but Gamma color space, you can comment-out the defineLINEAR_COLOR_SPACE_FIX_ADDITIVE_ALPHA
inMeshGenerator.cs
to deactivate the fix or just to skip unnecessary instructions. - Fixed SkeletonRootMotion components ignoring parent bone scale when set by transform constraints. Using applied scale of parent bone now. If you need the old behaviour, comment out the line
#define USE_APPLIED_PARENT_SCALE
in SkeletonRootMotionBase.cs. - Fixed SkeletonUtility callback update order when used with SkeletonRootMotion components so that the position when following a bone is updated after SkeletonRootMotion clears root-bone position. The order of SkeletonUtilityBone callbacks is changed to be later to achieve this. This is a breaking change in the unlikely case that you are using SkeletonRootMotion together with SkeletonUtility and subscribed to
UpdateLocal
,UpdateWorld
orUpdateComplete
yourself and relied on a certain callback order. One solution is to then resubscribe your own callback events accordingly by calling.UpdateLocal -= Callback; .UpdateLocal += Callback;
.
- Changed
-
Changes of default values
-
Deprecated
-
Restructuring (Non-Breaking)
- Additions
- Apply external movement to physics: If you are not directly modifying
Skeleton.X
orSkeleton.Y
, you can apply external game object movement to skeleton physics as follows: Add aVector2 lastPosition;
member variable to your class interacting with the skeleton. Then call e.g. the following code each frame:Vector2 currentPosition = <current world position>; Vector2 externalPositionDelta = currentPosition - lastPosition; skeleton.PhysicsTranslate(externalPositionDelta.x, externalPositionDelta.y); lastPosition = currentPosition;
- Apply external movement to physics: If you are not directly modifying
- Added physics support
- Added
PhysicsConstraintXXXTimeline
andPhysicsConstraintResetTimeline
- Added
Physics
to be passed toSkeleton#updateWorldTransform()
- Added
SkeletonData#findPhysicsConstraint()
andSkeletonData#getPhysicsConstraints()
to query physics constraints - Added
Skeleton#findPhysicsConstraint()
andSkeleton#getPhysicsConstraints()
to query physics constraints - Added
Skeleton#physicsTranslate()
to translate all physics constraints by some distances in the skeleton coordinate system - Added
Skeleton#physicsRotate()
to rotate all physics constraints by some distances in the skeleton coordinate system - Added
Skeleton#time
and respective setters/getters to keep track of time for physics simulations - See also breaking changes for
Skeleton#updateWorldTransform()
and the requirement to callSkeleton#update()
to advance pyhsics each frame.
- Added
- Added
InheritTimeline
- Added
TrackEntry#alphaAttachmentThreshold
- Added
TrackEntry#setMixDuration()
to set the mix duration in conjunction with a delay - Added
TrackEntry#wasApplied()
to check if the entry has been applied - Added
Bone#worldToParent()
to transform coordinates from world space to the parent space of a bone - Added
Bone#localToParent()
to transform coordinates from a bone's local space to its parent space - Added non essential fields
icon
andvisible
toBoneData
- Added non essential fields
path
andvisible
toSlotData
- Added
setToSetupPose()
to all contraint classes - Breaking changes
- Renamed
TrackEntry#attachmentThreshold
toTrackEntry#mixAttachmentThreshold
along with respective getters/settesr - Renamed
TrackEntry::drawOrderThreshold
toTrackEntry#mixDrawOrdertThreshold
along with respective getters/settesr - Renamed
TransformMode
toInherit
and allTransformMode_*
enums toInherit_*
- You must call
Skeleton#update(delta)
before callingSkeleton#updateWorldTransform()
if the frame time has advanced. This is needed to update physics accordingly Skeleton#updateWorldTransform()
takes an additionalPhysics
parameter. See thePhysics
documentation for information on what the different enum values do- All
Updatable
sub-classes likeBone
and constraints now take an additionalPhysics
parameter for theirupdate()
methods
- Renamed
- Added physics examples
- Added physics support
- Added
PhysicsConstraintXXXTimeline
andPhysicsConstraintResetTimeline
- Added
Physics
to be passed toSkeleton#updateWorldTransform()
- Added
SkeletonData#findPhysicsConstraint()
andSkeletonData#getPhysicsConstraints()
to query physics constraints - Added
Skeleton#findPhysicsConstraint()
andSkeleton#getPhysicsConstraints()
to query physics constraints - Added
Skeleton#physicsTranslate()
to translate all physics constraints by some distances in the skeleton coordinate system - Added
Skeleton#physicsRotate()
to rotate all physics constraints by some distances in the skeleton coordinate system - Added
Skeleton#time
and respective setters/getters to keep track of time for physics simulations - See also breaking changes for
Skeleton#updateWorldTransform()
and the requirement to callSkeleton#update()
to advance pyhsics each frame.
- Added
- Added
InheritTimeline
- Added
TrackEntry#alphaAttachmentThreshold
- Added
TrackEntry#setMixDuration()
to set the mix duration in conjunction with a delay - Added
TrackEntry#wasApplied()
to check if the entry has been applied - Added
Bone#worldToParent()
to transform coordinates from world space to the parent space of a bone - Added
Bone#localToParent()
to transform coordinates from a bone's local space to its parent space - Added non essential fields
icon
andvisible
toBoneData
- Added non essential fields
path
andvisible
toSlotData
- Added
setToSetupPose()
to all contraint classes - Breaking changes
- Renamed
TrackEntry#attachmentThreshold
toTrackEntry#mixAttachmentThreshold
along with respective getters/settesr - Renamed
TrackEntry::drawOrderThreshold
toTrackEntry#mixDrawOrdertThreshold
along with respective getters/settesr - Renamed
TransformMode
toInherit
and allTransformMode_*
enums toInherit_*
- You must call
Skeleton#update(delta)
before callingSkeleton#updateWorldTransform()
if the frame time has advanced. This is needed to update physics accordingly Skeleton#updateWorldTransform()
takes an additionalPhysics
parameter. See thePhysics
documentation for information on what the different enum values do- All
Updatable
sub-classes likeBone
and constraints now take an additionalPhysics
parameter for theirupdate()
methods
- Renamed
- Added physics examples
- Added spine-canvaskit runtime. See https://esotericsoftware.com/spine-canvaskit
- Added physics support
- Added physics support
- Added
scale
field to configuration which defines the scale to load the skeleton at - Added
updateWorldTransform
field to configuration which expects a function that updates the skeleton. Defaults to player.skeleton.updateWorldTransform(spine.Physics.update) - Added
skeleton
toSpinePlayerConfig
to specify the URL of the skeleton .json or .skel file. DeprecatedjsonURL
andbinaryURL
. The old fields can still be used, but will be removed in Spine 4.3 - Added
atlas
toSpinePlayerConfig
to specify the URL of the .atlas file. DeprecatedatlasURL
. The old field can still be used, but will be removed in Spine 4.3.
- Added spine-pixi runtime, also backported to Spine 4.1. See https://esotericsoftware.com/spine-pixi
- Added spine-phaser runtime, also backported to Spine 4.1. See https://esotericsoftware.com/spine-phaser
- Added spine-haxe runtime, also backported to Spine 4.1. See https://esotericsoftware.com/spine-haxe
- Added spine-flutter runtime, also backported to Spine 4.1. See https://esotericsoftware.com/spine-flutter
- Additions
- Support for sequences.
- Support for
shortestRotation
in animation state. See #2027. - Added CMake parameter
SPINE_SANITIZE
which will enable sanitizers on macOS and Linux. - Added
SPINE_MAJOR_VERSION
,SPINE_MINOR_VERSION
, andSPINE_VERSION_STRING
. Parsing skeleton .JSON and .skel files will report an error if the skeleton version does not match the runtime version.
- Breaking changes
spRegionAttachment
andspMeshAttachment
now contain aspTextureRegion*
instead of encoding region fields directly.sp_AttachmentLoader_newRegionAttachment()
andspAttachmentLoader_newMeshAttachment()
now take an additionalSequence*
parameter.spMeshAttachment_updateUVs()
was renamed tospMeshAttachment_updateRegion()
.spRegionAttachment_updateOffset()
was renamed tospRegionAttachment_updateRegion()
,spRegionAttachment_setUVs()
was merged intospRegionAttachment_updateRegion()
.spSlot_getAttachmentTime()
andspSlot_setAttachmentTime()
have been removed.spVertexAttachment->deformAttachment
was renamed tospVertexAttachment->timelineAttachment
.spSkeleton_update()
has been removed.spSkeleton->time
has been removed.spVertexEffect
has been removed.
- Updated example to use SFML 2.5.1.
- Added dragon example.
- Additions
- Support for sequences.
- Support for
shortestRotation
in animation state. See #2027. - Added CMake parameter
SPINE_SANITIZE
which will enable sanitizers on macOS and Linux.- Added
SPINE_MAJOR_VERSION
,SPINE_MINOR_VERSION
, andSPINE_VERSION_STRING
. Parsing skeleton .JSON and .skel files will report an error if the skeleton version does not match the runtime version.
- Added
- Added
SkeletonBounds::getBoundingBox()
,SkeletonBounds::getPolygons()
, andSkeletonBounds::getBoundingBoxes()
.
- Breaking changes
RegionAttachment
andMeshAttachment
no longer implementHasRendererObject
.RegionAttachment
andMeshAttachment
now contain aTextureRegion*
instead of encoding region fields directly.AttachmentLoader::newRegionAttachment()
andAttachmentLoader::newMeshAttachment()
now take an additionalSequence*
parameter.MeshAttachment::updateUVs()
was renamed toMeshAttachment::updateRegion()
.RegionAttachment::updateOffset()
was renamed toRegionAttachment::updateRegion()
,RegionAttachment::setUVs()
was merged intoupdateRegion()
.Slot::getAttachmentTime()
andSlot::setAttachmentTime()
have been removed.VertexAttachment::getDeformAttachment()
was renamed toVertexAttachment::getTimelineAttachment()
.Skeleton::update()
has been removed.Skeleton::getTime()
has been removed.VertexEffect
has been removed.
- Renamed
SkeletonRenderer
toSkeletonRendererCocos2dX
to avoid name clash with spine-cpp class.
- Updated example to use SFML 2.5.1.
- Added dragon example.
- Updated example project to UE 4.27
-
Additions
- Full support for sequences.
- Support for
shortestRotation
in animation state. See #2027. RegionAttachment
andMeshAttachment
now provide aRegion
property. Use this property instead of the removedRendererObject
property (see section Breaking Changes below).
-
Breaking changes
- Removed
RendererObject
property fromRegionAttachment
andMeshAttachment
. Useattachment.Region
property instead. Removed removedIHasRendererObject
interface. UseIHasTextureRegion
instead. - Replaced
RegionAttachment.UpdateOffset
andMeshAttachment.UpdateUVs
withAttachment.UpdateRegion
. The caller must ensure that the attachment's region is notnull
. - Removed
AttachmentRegionExtensions
methodsAttachment.SetRegion
,MeshAttachment.SetRegion
andRegionAttachment.SetRegion(region, update)
. Useattachment.Region = region; if (update) attachment.UpdateRegion()
instead. AttachmentLoader.NewRegionAttachment()
andAttachmentLoader.NewMeshAttachment()
take an additionalSequence
parameter.VertexAttachment.DeformAttachment
property has been replaced withVertexAttachment.TimelineAttachment
.RegionAttachment.ComputeWorldVertices()
takes aSlot
instead of aBone
as the first argument.- Removed
Skeleton.Update(float deltaTime)
method. - Removed
Slot.AttachmentTime
property. - Removed extension method
AtlasRegion.GetSpineAtlasRect()
parameterincludeRotate
(with default valuetrue
). Most likely this method was never used withincludeRotate=false
in user code so no changes are required. AtlasRegion.PackedWidth
andAtlasRegion.PackedHeight
are swapped compared to 4.0 when packing rotation is equal to 90 degrees. Most likely this property was never accessed in user code so no changes are required.
- Removed
-
Officially supported Unity versions are 2017.1-2023.1.
-
Additions
SpineAtlasAsset.CreateRuntimeInstance
methods now provide an optionalnewCustomTextureLoader
parameter (defaults tonull
) which can be set to e.g.(a) => new YourCustomTextureLoader(a)
to use your ownTextureLoader
subclass instead ofMaterialsTextureLoader
.SkeletonAnimation
,SkeletonMecanim
andSkeletonGraphic
now provide an Inspector parameterAdvanced
-Animation Update
with modesIn Update
(previous behaviour, the default),In FixedUpdate
andManual Update
. This allows to update animation inFixedUpdate
when using theSkeletonRootMotion
component (which is the recommended combination now, issuing a warning otherwise). The reason is that when root motion leads to a collision with a physics collider, it can introduce jittery excess movement when updating animation inUpdate
due to moreUpdate
calls following a singleFixedUpdate
call.- Added
SkeletonRootMotion
propertiesPreviousRigidbodyRootMotion
andAdditionalRigidbody2DMovement
. Setting or querying these movement vectors can be necessary when multiple scripts callRigidbody2D.MovePosition
on the same object where the last call overwrites the effect of preceding ones. BoneFollower
andBoneFollowerGraphic
now provide an additionalFollow Parent World Scale
parameter to allow following simple scale of parent bones (rotated/skewed scale can't be supported).- Improved
Advanced - Fix Prefab Override MeshFilter
property forSkeletonRenderer
(and subclassesSkeletonAnimation
andSkeletonMecanim
), now providing an additional option to use a global value which can be set inEdit - Preferences - Spine
. - Timeline naming improvements:
Spine AnimationState Clip
Inspector parameterCustom Duration
changed and inverted toDefault Mix Duration
for more clarity. Shortened all Timeline add track menu entries from:Spine.Unity.Playables - <track type>
toSpine - <track type>
,Spine Animation State Track
toSkeletonAnimation Track
,Spine AnimationState Graphic Track
toSkeletonGraphic Track
, andSpine Skeleton Flip Track
toSkeleton Flip Track
. - Timeline track appearance and Inspector: Tracks now show icons and track colors to make them easier to distinguish. When a Track is selected, the Inspector now shows an editable track name which was previously only editable at the Timeline asset.
- Added example component
SkeletonRenderTexture
to render aSkeletonRenderer
to aRenderTexture
, mainly for proper transparency. Added an example scene namedRenderTexture FadeOut Transparency
that demonstrates usage for a fadeout transparency effect. - Added another fadeout example component named
SkeletonRenderTextureFadeout
which takes over transparency fadeout when enabled. You can use this component as-is, attach it in disabled state and enable it to start a fadeout effect. - Timeline clips now offer an additional
Alpha
parameter for setting a custom constant mix alpha value other than 1.0, just asTrackEntry.Alpha
. Defaults to 1.0. GetRemappedClone
copying fromSprite
now provides additionalpmaCloneTextureFormat
andpmaCloneMipmaps
parameters to explicitly specify the texture format of a newly created PMA texture.- Spine property Inspector fields (
Animation Name
,Bone Name
,Slot
and similar) now display the name in red when the respective animation/bone/etc no longer exists at the skeleton data. This may be helpful when such items have been renamed or deleted. - Added
UnscaledTime
property atSkeletonAnimation
as well, behaving likeSkeletonGraphic.UnscaledTime
. If enabled, AnimationState uses unscaled game time (Time.unscaledDeltaTime
), running animations independent of e.g. game pause (Time.timeScale
). SkeletonAnimation
,SkeletonMecanim
andSkeletonGraphic
now provide an additionalOnAnimationRebuild
callback delegate which is issued after both the skeleton and the animation state have been initialized.- Timeline
SkeletonAnimation Track
andSkeletonGraphic Track
now provide anUnscaled Time
property. Whenever starting a new animation clip of this track,SkeletonAnimation.UnscaledTime
orSkeletonGraphic.UnscaledTime
will be set to this value. This allows you to play back Timeline clips either in normal game time or unscaled game time. Note thatPlayableDirector.UpdateMethod
is ignored and replaced by this property, which allows more fine-granular control per Timeline track. - Added
SkeletonRootMotion
callback delegatesProcessRootMotionOverride
andPhysicsUpdateRootMotionOverride
to customize how root motion is applied. The new propertydisableOnOverride
determines whether the callback will be issued in addition or instead of normally applying root motion. Added propertyrootMotionScaleRotation
to allow scaling rotational root-motion to match e.g. a 90 degree rotation to a custom target angle. - Added outline shader parameter
Advanced - Opaque Alpha
which can be used to exclude problematic semi-transparent areas, which may receive an undesired large outline color overlay otherwise. - Added Spine Preferences setting
Prefabs
-Optimize Preview Meshes
. When enabled, Spine prefab preview meshes will be removed in a pre-build step to reduce build size. This increases build time as all prefabs in the project will be processed. Defaults to false to not slow down builds substantially every time. - Added Spine Preferences setting
Reload SkeletonData after Play
. When enabled, the sharedSkeletonData
of all skeletons in the active scene is reloaded (from the.json
or.skel.bytes
file) after exiting play-mode. You can disable this setting to avoid the reloading delay if you can ensure that there are no (accidental) modifications to the sharedSkeletonData
during play-mode (otherwise it would carry over its effect into subsequent plays). Defaults totrue
(the safe setting), which maintains existing behaviour. - Added
SkeletonAnimationMulti
sample component methodsSetActiveSkeleton(int index)
and getter propertySkeletonAnimations
to more easily apply changes at all SkeletonAnimation instances instead of only the active one. - PMA textures now have
sRGB (Color Texture)
disabled by default, the preset templatePMATexturePreset.preset
has been adjusted accordingly. As PMA textures are only allowed with Gamma color space,sRGB (Color Texture)
shall be disabled to prevent border artifacts when mipmaps are enabled. In Gamma color space having this setting disabled has no drawbacks, only benefits. SkeletonRenderTexture
andSkeletonGraphicRenderTexture
components now support automatic down-scaling when required size on screen exceedsMax Render Texture Size
.- Added
Spine/SkeletonGraphic Fill
shader to provide functionality ofSpine/Skeleton Fill
shader forSkeletonGraphic
. - Lit Spine URP shaders (
Universal Render Pipeline/Spine/Sprite
andUniversal Render Pipeline/Spine/Skeleton Lit
) now supportForward+
rendering path as introduced by Unity 2022.2 and URP version 14. SkeletonGraphic
now supports automatic scaling based on itsRectTransform
bounds. Automatic scaling can be enabled by setting the addedLayout Scale Mode
Inspector property to eitherWidth Controls Height
,Height Controls Width
,FitInParent
orEnvelopeParent
. It is set toNone
by default to keep previous behaviour and avoid breaking existing projects. To modify the reference layout bounds, hit the additionalEdit Layout Bounds
toggle button to switch into edit mode, adjust the bounds or hitMatch RectTransform with Mesh
, and hit the button again when done adjusting. The skeleton will now be scaled accordingly to fit the reference layout bounds to the object'sRectTransform
.- Added previously missing unlit URP 2D shader variant, available under
Universal Render Pipeline/2D/Spine/Skeleton
. - Added support for light cookies at
Universal Render Pipeline/Spine/Sprite
shader. - Timeline extension package: An additional Spine preferences parameter
Timeline
-Default Mix Duration
has been added, setting newly addedSpineAnimationStateClip
clips accordingly, defaults to false. This Spine preferences parameter can be enabled to default to the previous behaviour before this update. - Tint Black: Added support for Tint Black functionality at all Spine URP shaders (2D and 3D shaders) and at all standard pipeline
Spine/Sprite
shaders. This feature can be enabled via theTint Black
material parameter in the Inspector. Note: The URP Sprite shaders provided in the Spine URP Shaders extension UPM package require the latest version of the spine-unity runtime (package version 4.1.12, 2023-05-31 or newer) to display the added material parameters in the Inspector GUI. - Added
SkeletonGraphic.MeshScale
property to allow access to calculated mesh scale.MeshScale
is based on (1) Canvas pixels per unit, and (2)RectTransform
bounds when usingLayout Scale Mode
other thanNone
atSkeletonGraphic
which scales the skeleton mesh to fit the parentRectTransform
bounds accordingly. - Added
updateSeparatorPartScale
property toSkeletonGraphic
to let render separator parts follow the scale (lossy scale) of theSkeletonGraphic
GameObject. Defaults tofalse
to maintain existing behaviour. - Added experimental
EditorSkeletonPlayer
component to allow Editor playback of the initial animation set atSkeletonAnimation
orSkeletonGraphic
components. Add this component to your skeleton GameObject to enable the in-editor animation preview. Allows configurations for continuous playback when selected, deselected, and alternative single-frame preview by settingFixed Track Time
to any value other than 0. Limitations: At skeletons with variable material count the Inspector preview may be too unresponsive. It is then recommended to disable theEditorSkeletonPlayer
component (at the top of the Inspector) to make it responsive again, then you can disablePlay When Selected
and re-enable the component to preview playback only when deselected. - Added example component
RenderCombinedMesh
to render a combined mesh of multiple meshes or submeshes. This is required byOutlineOnly
shaders to render a combined outline when usingSkeletonRenderSeparator
or multiple atlas pages which would normally lead to outlines around individual parts. To add a combined outline to your SkeletenRenderer:- Add a child GameObject and move it a bit back (e.g. position Z = 0.01).
- Add a
RenderCombinedMesh
component, provided in theSpine Examples/Scripts/Sample Components
directory. - Copy the original material, add _Outline to its name and set the shader to your outline-only shader like
Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly
orSpine/Outline/OutlineOnly-ZWrite
. - Assign this _Outline material at the new child GameObject's
MeshRenderer
component. If you are usingSkeletonRenderSeparator
and need to enable and disable theSkeletonRenderSeparator
component at runtime, you can increase theRenderCombinedMesh
Reference Renderers
array by one and assign theSkeletonRenderer
itself at the last entry after the parts renderers. DisabledMeshRenderer
components will be skipped when combining the final mesh, so the combined mesh is automatically filled from the desired active renderers.
- Timeline extension package: Added static
EditorEvent
callback to allow editor scripts to react to animation events outside of play-mode. Register to the events viaSpine.Unity.Playables.SpineAnimationStateMixerBehaviour.EditorEvent += YourCallback;
. - URP Shaders: Added
Depth Write
property to shadersUniversal Render Pipeline/Spine/Skeleton
andUniversal Render Pipeline/Spine/Skeleton Lit
. Defaults to false to maintain existing behaviour. - Added
Animation Update
mode (calledUpdateTiming
in code)In Late Update
forSkeletonAnimation
,SkeletonMecanim
andSkeletonGraphic
. This allows you to update theSkeletonMecanim
skeleton in the same frame that the Mecanim Animator updated its state, which happens betweenUpdate
andLateUpdate
. - URP Shaders: Added URP "Blend Mode" shader variants for both URP 3D and URP 2D renderers. They are listed under shader name "Universal Render Pipeline/Spine/Blend Modes/" and "Universal Render Pipeline/2D/Spine/Blend Modes/" respectively.
- URP Shaders: Added support for Tint Black functionality at "Blend Modes" Spine URP shaders (2D and 3D shaders).
-
Breaking changes
- Made
SkeletonGraphic.unscaledTime
parameter protected, use the new propertyUnscaledTime
instead. SkeletonGraphic
OnRebuild
callback delegate is now issued after the skeleton has been initialized, before theAnimationState
component is initialized. This makes behaviour consistent withSkeletonAnimation
andSkeletonMecanim
component behaviour. Use the new callbackOnAnimationRebuild
if you want to receive a callback after theSkeletonGraphic
AnimationState
has been initialized.- Changed name of prefab skeleton meshes stored at prefabs from
Skeleton Prefab Mesh "name"
toSkeleton Prefab Mesh [name]
to avoid issues with quotes in mesh asset names (see this issue). Likely this change poses no problems at all, however if you are parsing the prefab's mesh name for whatever reason, be sure to adjust the pattern accordingly.
- Made
-
Changes of default values
-
Deprecated
- Shader macro
RETURN_UNLIT_IF_ADDITIVE_SLOT
inspine-unity/Shaders/Sprite/CGIncludes/ShaderShared.cginc
has been deprecated and will be removed in spine-unity 4.2. Use RETURN_UNLIT_IF_ADDITIVE_SLOT_TINT instead.
- Shader macro
-
Restructuring (Non-Breaking)
- Moved Spine URP Shaders Examples directory from the main package directory to Samples which can be installed via the Unity Package Manager. To import, select the
Spine Universal RP Shaders
package in the Package Manager window, expandSamples
at the bottom and hitImport
next toExamples
. This follows the standard samples guideline and prevents warning messages about unexpectedly altered immutable assets.
- Moved Spine URP Shaders Examples directory from the main package directory to Samples which can be installed via the Unity Package Manager. To import, select the
- Breaking change: Removed spine-xna in favor of spine-monogame. See #1949
- Added new spine-monogame solution. See spine-monogame/README.md for updated instructions on how to use spine-monogame.
- Additions
- Support for
shortestRotation
in animation state. See #2027. - Support for sequences.
- Support for
- Breaking changes
AttachmentLoader#newRegionAttachment()
andAttachmentLoader#newMeshAttachment()
take an additionalSequence
parameter.Slot#setAttachmentTime()
andSlot#getAttachmentTime()
have been removed.VertexAttachment#setDeformAttachment()
andVertexAttachment#getDeformAttachment()
have been replaced withVertexAttachment#setTimelineAttachment()
andVertexAttachment#getTimelineAttachment()
.RegionAttachment#updateOffset()
has been renamed toRegionAttachment#updateRegion()
. The caller must ensure that the attachment's region is notnull
.RegionAttachment#computeWorldVertices()
takes aSlot
instead of aBone
as the first argument.VertexEffect
has been removed.
spine-libgdx
,spine-libgdx-tests
, andspine-skeletonviewer
are now fully Gradle-ified.spine-skeletonviewer
now supports quickly loading skeletons by dragging and dropping.json
or.skel
skeleton files onto the window.
- Additions
- full support for sequences.
- Added
Promise
basedAssetManager.loadAll()
. Allows synchronous waiting viaawait assetManager.loadAll()
, simplifying loader logic in applications. - Support for
shortestRotation
in animation state. See #2027. - Full support for sequences.
- Breaking changes
AttachmentLoader#newRegionAttachment()
andAttachmentLoader#newMeshAttachment()
take an additionalSequence
parameter.Slot#attachmentTime
and has been removed.VertexAttachment#deformAttachment
has been replaced withVertexAttachment#timelineAttachment
.RegionAttachment#updateOffset()
has been renamed toRegionAttachment#updateRegion()
. The caller must ensure that the attachment's region is notnull
.RegionAttachment#computeWorldVertices()
takes aSlot
instead of aBone
as the first argument.- Removed
PlayerEditor
. VertexEffect
has been removed.- Removed
RegionAttachment.rendererObject
. - Renamed
TextureRegion.renderObject
toTextureRegion.texture
.
PolygonBatcher
can now disable culling automatically if the static variablePolygonBatcher.disableCulling
is set to true.- Added
SpineCanvas
, a simpler way to render a scene via spine-webgl. Seespine-ts/spine-webgl/examples/barebones.html
andspine-ts/spine-webgl/examples/mix-and-match.html
. - Added
SpineCanavs.dispose()
to halt the updating and rendering of the canvas.
- Improved example.
- Added orbital controls to THREJS example.
SkeletonMesh
takes an optionalSkeletonMeshMaterialCustomizer
, allowing modification of materials used bySkeletonMesh
.- Added
SkeletonMeshMaterial.alphaTest
, when > 0, alpha testing will be performed and fragments will not be written to the depth buffer, if depth writes are enabled.
- Added
SpinePlayer.dispose()
to explicitely dispose of all resources the player holds on to.
NOTE: Spine 4.0 will be the last release supporting spine-as3. Starting from Spine 4.1, spine-as3 will no longer be supported or maintained.
- Switched projects from FDT to Visual Studio Code. See updated
README.md
files for instructions. - Expose non-essential colors on bones, bounding box, clipping, and path attachments.
- Timeline API has been extended to support component-wise timelines exported by Spine 4.0.
- Added
AnimationState.clearNext()
which removes the givenTrackEntry
and all entries after it. - Added support for texture atlas key value pairs, see
AtlasRegion.names
andAtlasRegion.values
. - Added support for reverse animation playback via
TrackEntry.reverse
. - Added proportional spacing mode support for path constraints.
- Added support for uniform scaling for two bone IK.
- Fixed applying a constraint reverting changes from other constraints.
NOTE: Spine 4.0 will be the last release supporting spine-starling. Starting from Spine 4.1, spine-starling will no longer be supported or maintained.
- Switched projects from FDT to Visual Studio Code. See updated
README.md
files for instructions. - Updated to Starling 2.6 and Air SDK 33.
- Breaking change: Removed
SPINE_SHORT_NAMES
define and C++ constructors. - Timeline API has been extended to support component-wise timelines exported by Spine 4.0.
- Added
spAnimationState_clearNext()
which removes the givenspTrackEntry
and all entries after it. - Added support for texture atlas key value pairs, see
spAtlasRegion.keyValues
. - Added support for reverse animation playback via
spTrackEntry.reverse
. - Added proportional spacing mode support for path constraints.
- Added support for uniform scaling for two bone IK.
- Fixed applying a constraint reverting changes from other constraints.
NOTE: Spine 4.0 will be the last release supporting spine-cocos2d-objc. Starting from Spine 4.1, spine-cocos2d-objc will no longer be supported or maintained.
- Added
ikDemo()
inmain.cpp
. to illustrate how to drive a bone and IK chain through mouse movement.
- Removed dependency on STL throughout the code base, cutting down on the LOC that need parsing by 66%.
- Exposed
x
andy
onSkeletonData
through getters and setters. - Expose non-essential colors on bones, bounding box, clipping, and path attachments.
- Timeline API has been extended to support component-wise timelines exported by Spine 4.0.
- Added
AnimationState.clearNext()
which removes the givenTrackEntry
and all entries after it. - Added support for texture atlas key value pairs, see
AtlasRegion.names
andAtlasRegion.values
. - Added support for reverse animation playback via
TrackEntry.reverse
. - Added proportional spacing mode support for path constraints.
- Added support for uniform scaling for two bone IK.
- Fixed applying a constraint reverting changes from other constraints.
- spine-cpp now requires C++11.
- Added
IKExample
scene to illustrate how to drive a bone and IK chain through mouse movement. - Added
SkeletonAnimation::setPreUpdateWorldTransformsListener()
andSkeletonAnimation::setPostUpdateWorldTransformsListener()
. This allows users to modify bone transforms and other skeleton properties before and after the world transforms of all bones are calculated. See theIKExample
for a usage example.
- Added
ikDemo()
inmain.cpp
. to illustrate how to drive a bone and IK chain through mouse movement.
SpineWidget
now supports the full widget transform, including rendering scale/shear.- Materials on
SkeletonRendererComponent
are now blueprint read and writeable. This allows setting dynamic material instances at runtime. - Added
InitialSkin
property toUSpineWidget
. This allows previewing different skins in the UMG Designer. Initial skins can still be overridden via blueprint events such asOn Initialized
. - Breaking change:
SpineWidget
no longer has theScale
property. Instead the size x/y properties can be used. - Added
SetSlotColor
onUSpineSkeletonComponent
to easily set the color of a slot via blueprints. - Changed mixes set on an
SkeletonDataAsset
will now be applied to instances ofUSpineSkeletonComponent
. - Generated normals are now correctly flipped for back faces.
- Modifying parent materials updates material instances accordingly.
- Only
.json
files that are actually encoding Spine skeletons will be loaded. Other.json
files will be left to other importers. - Updated example project to UE 4.27.
- Timeline API has been extended to support component-wise timelines exported by Spine 4.0.
- Added
AnimationState.clearNext()
which removes the givenTrackEntry
and all entries after it. - Added support for texture atlas key value pairs, see
AtlasRegion.names
andAtlasRegion.values
. - Added support for reverse animation playback via
TrackEntry.Reverse
. - Added proportional spacing mode support for path constraints.
- Added support for uniform scaling for two bone IK.
- Fixed applying a constraint reverting changes from other constraints.
- Breaking change: Removed
SkeletonData
andSkeleton
methods:FindBoneIndex
,FindSlotIndex
. Bones and slots have anIndex
field that should be used instead. Be sure to check for e.g.bone == null
accordingly before accessingbone.Index
.
-
Officially supported Unity versions are 2017.1-2022.1.
-
Breaking changes
-
Removed all
Spine.Unity.AttachmentTools.SkinUtilities
Skin extension methods. These have become obsoleted and error-prone since the introduction of the new Skin API in 3.8. To fix any compile errors, replace any usage ofSkin
extension methods with their counterparts, e.g. replace occurrances ofskin.AddAttachments()
withskin.AddSkin()
. Please see the example sceneMix and Match Skins
on how to use the new Skin API to combine skins, or the updated old example scenesMix and Match
andMix and Match Equip
on how you can update an existing project using the old workflow. If you are usingskeletonAnimation.Skeleton.UnshareSkin()
in your code, you can replace it withSkin customSkin = new Skin("custom skin"); customSkin.AddSkin(skeletonAnimation.Skeleton.Skin);
. -
Skin.GetAttachments()
has been replaced bySkin.Attachments
, returning anICollection<SkinEntry>
. This makes access more consistent and intuitive. To fix any compile errors, replace any occurrances ofSkin.GetAttachments()
bySkin.Attachments
. -
Removed redundant
Spine.Unity.AttachmentTools.AttachmentCloneExtensions
extension methodsAttachment.GetCopy()
andAttachment.GetLinkedMesh()
. To fix any compile errors, replace any occurrances withAttachment.Copy()
andAttachment.NewLinkedMesh()
. -
Removed
Spine.Unity.AttachmentTools.AttachmentRegionExtensions
extension methodsAttachment.GetRegion()
. UseAttachment.RendererObject as AtlasRegion
instead. -
Removed redundant
Spine.SkeletonExtensions
extension methods: Replace:Skeleton.SetPropertyToSetupPose()
Skeleton.SetDrawOrderToSetupPose()
Skeleton.SetSlotAttachmentsToSetupPose()
Skeleton.SetSlotAttachmentToSetupPose()
with
Skeleton.SetSlotsToSetupPose()
. Replace:Slot.SetColorToSetupPose()
Slot.SetAttachmentToSetupPose()
with
Slot.SetToSetupPose()
.Also removed less commonly used extension methods:
TrackEntry.AllowImmediateQueue()
,Animation.SetKeyedItemsToSetupPose()
andAttachment.IsRenderable()
. -
SkeletonGraphic
now no longer uses aRawImage
component at each submesh renderer GameObject whenallowMultipleCanvasRenderers
is true. Instead, a new custom componentSkeletonSubmeshGraphic
is used which is more resource friendly. Replacement of these components will be performed automatically through editor scripting, saving scenes or prefabs will persist the upgrade. -
Linear color space: Previously Slot colors were not displayed the same in Unity as in the Spine Editor. This is now fixed at all shaders, including URP and LWRP shaders. See section Additions below for more details. If you have tweaked Slot colors to look correct in
Linear
color space in Unity but incorrect in Spine, you might want to adjust the tweaked colors. Slot colors displayed in Unity should now match colors displayed in the Spine Editor when configured to display asLinear
color space in the Spine Editor Settings. -
Additive Slots have always been lit before they were written to the target buffer. Now all lit shaders provide an additional parameter
Light Affects Additive
which defaults tofalse
, as it is the more intuitive default value. You can enable the old behaviour by setting this parameter totrue
. -
Corrected blending behaviour of all
Sprite
shaders inPremultiply Alpha
blend mode (including URP and LWRP packages). Previously vertex color alpha was premultiplied again, even thoughPremultiply Alpha
blend mode assumes PMA texture and PMA vertex color input. Slot-alpha blending will thus be correctly lighter after upgrading to 4.0. If you have compensated this problem by disablingAdvanced - PMA Vertex Colors
you can now re-enable this parameter, also allowing for rendering Additive slots in a single pass. -
Corrected all
Outline
shaders outline thickness whenAdvanced - Sample 8 Neighbourhood
is disabled (thus using4 Neighbourhood
). Previously weighting was incorrectly thick (4x as thick) compared to 8 neighbourhood, now it is more consistent. This might require adjustment of all your outline materials whereSample 8 Neighbourhood
is disabled to restore the previous outline thickness, by adjusting theOutline Threshold
parameter through adding a/4
to make the threshold 4 times smaller. -
Reverted changes:
BoneFollower
propertyfollowLocalScale
has intermediately been renamed tofollowScale
but was renamed back tofollowLocalScale
. Serialized values (scenes and prefabs) will automatically be upgraded, only code accessingfollowScale
needs to be adapted. -
Fixed Timeline not pausing (and resuming) clip playback on Director pause, this is now the default behaviour. If you require the old behaviour (e.g. to continue playing an idle animation during Director pause), there is now an additional parameter
Don't Pause with Director
provided that can be enabled for each Timeline clip. -
Fixed Timeline
Spine AnimationState Clips
ignoring empty space on the Timeline after a clip's end. Timeline clips now also offerDon't End with Clip
andClip End Mix Out Duration
parameters if you prefer the old behaviour of previous versions. By default when empty space follows the clip on the timeline, the empty animation is set on the track with a MixDuration ofClip End Mix Out Duration
. SetDon't End with Clip
totrue
to continue playing the clip's animation instead and mimic the old 3.8 behaviour. If you prefer pausing the animation instead of mixing out to the empty animation, setClip End Mix Out Duration
to a value less than 0, then the animation is paused instead.
-
-
Additions and Improvements
-
Additional Fix Draw Order parameter at SkeletonRenderer, defaults to
disabled
(previous behaviour). Applies only when 3+ submeshes are used (2+ materials with alternating order, e.g. "A B A"). Iftrue
, MaterialPropertyBlocks are assigned at each material to prevent aggressive batching of submeshes by e.g. the LWRP renderer, leading to incorrect draw order (e.g. "A1 B A2" changed to "A1A2 B"). You can leave this parameter disabled when everything is drawn correctly to save the additional performance cost. -
Additional Timeline features. SpineAnimationStateClip now provides a
Speed Multiplier
, a start time offset parameterClip In
, support for blending successive animations by overlapping tracks. An additionalUse Blend Duration
parameter (defaults to true) allows for automatic synchronisation of MixDuration with the current overlap blend duration. An additional Spine preferences parameterUse Blend Duration
has been added which can be disabled to default to the previous behaviour before this update. -
Additional
SpriteMask and RectMask2D
example scene added for demonstration of mask setup and interaction. -
Real physics hinge chains
for both 2D and 3D physics. The SkeletonUtilityBone Inspector provides an interface to create 2D and 3D hinge chains. Previously created chains have only been respecting gravity, but not momentum of the skeleton or parent bones. The new physics rig created when pressingCreate 3D Hinge Chain
andCreate 2D Hinge Chain
creates a more complex setup that also works when flipping the skeleton. Note that the chain root node is no longer parented to bones of the skeleton. This is a requirement in Unity to have momentum applied properly - do not reparent the chain root to bones of your skeleton, or you will loose any momentum applied by the skeleton's movement. -
Outline rendering functionality for all shaders.
Every shader now provides an additional set ofOutline
parameters to enable custom outline rendering. When outline rendering is enabled via theMaterial
inspector, it automatically switches the shader to the respectiveSpine/Outline
shader variant. Outlines are generated by sampling neighbour pixels, so be sure to add enough transparent padding when exporting your atlas textures to fit the desired outline width. In order to enable outline rendering at a skeleton, it is recommended to first prepare an additional outline material copy and then switch the material of the target skeleton to this material. This prevents unnecessary additional runtime material copies and drawcalls. Material switching can be prepared via a SkeletonRendererCustomMaterials component and then enabled or disabled at runtime. Alternatively, you can also directly modify theSkeletonRenderer.CustomMaterialOverride
property. Outline rendering is fully supported onSkeletonGraphic
shaders as well. -
Added
SkeletonRenderer.EditorSkipSkinSync
scripting API property to be able to set custom skins in editor scripts. Enable this property when overwriting the Skeleton's skin from an editor script. Without setting this parameter, changes will be overwritten by the next inspector update. Only affects Inspector synchronisation of skin withinitialSkinName
, not startup initialization. -
AtlasUtilities.GetRepackedAttachments()
andAtlasUtilities.GetRepackedSkin()
provide support for additional texture channels such as normal maps via the optional parameteradditionalTexturePropertyIDsToCopy
. See the spine-unity runtime documentation, section Combining Skins - Advanced - Runtime Repacking with Normalmaps for further info and example usage code. -
BoneFollower
can now optionally follow (uniform) world scale of the reference bone. There is now aMode
dropdown selector in the Inspector which can be set to eitherLocal
orWorld Uniform
. -
All
Spine/SkeletonGraphic
shaders now provide a parameterCanvasGroup Compatible
which can be enabled to supportCanvasGroup
alpha blending. For correct results, you should then disablePma Vertex Colors
in theSkeletonGraphic
Inspector, in sectionAdvanced
(otherwise Slot alpha will be applied twice). -
Now supporting Universal Render Pipeline (URP), including the 2D Renderer pipeline, through an additional UPM package.
-
Installation: You can download the Unity Package Manager (UPM) package via the download page or find it in the spine-runtimes/spine-unity/Modules subdirectory on the git repository. You can then either unzip (copy if using git) the package to
- a) the
Packages
directory in your project where it will automatically be loaded, or - b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the
+
icon, chooseAdd package from disk..
and point it to the package.json file.
The Project panel should now show an entry
Spine Universal RP Shaders
underPackages
. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. - a) the
-
Usage: The package provides two shaders specifically built for the universal render pipeline:
Universal Render Pipeline/Spine/Skeleton
, as a universal variant of theSpine/Skeleton
shader,Universal Render Pipeline/Spine/Skeleton Lit
, as a universal variant of theSpine/Skeleton Lit
shader,Universal Render Pipeline/Spine/Sprite
, as a universal variant of theSpine/Sprite/Vertex Lit
andPixel Lit
shaders, which were not functioning in the universal render pipeline,
-
Universal Render Pipeline/2D/Spine/Skeleton Lit
, as a universal 2D Renderer variant of theSpine/Skeleton Lit
shader, andUniversal Render Pipeline/2D/Spine/Sprite
, as a universal 2D Renderer variant of theSpine/Sprite/Vertex Lit
andPixel Lit
shaders. The shaders can be assigned to materials as usual and will respect your settings of the assignedUniversalRenderPipelineAsset
underProject Settings - Graphics
.
-
Restrictions As all Spine shaders, the URP shaders do not support
Premultiply alpha
(PMA) atlas textures in Linear color space. Please export your atlas textures asstraight alpha
textures with disabledPremultiply alpha
setting when using Linear color space. You can check the current color space viaProject Settings - Player - Other Settings - Color Space.
. -
Example: You can find an example scene in the package under
com.esotericsoftware.spine.urp-shaders-3.8/Examples/URP Shaders.unity
that demonstrates usage of the URP shaders.
-
-
Spine Preferences now provide an
Atlas Texture Settings
parameter for applying customizable texture import settings at all newly imported Spine atlas textures. When exporting atlas textures from Spine withPremultiply alpha
enabled (the default), you can leave it atPMATexturePreset
. If you have disabledPremultiply alpha
, set it to the includedStraightAlphaTexturePreset
asset. You can also create your ownTextureImporter
Preset
asset and assign it here (includePMA
orStraight
in the name). In Unity versions before 2018.3 you can useTexture2D
template assets instead of the newerPreset
assets. Materials created for imported textures will also have theStraight Alpha Texture
parameter configured accordingly. -
All
Sprite
shaders (including URP and LWRP extension packages) now provide an additionalFixed Normal Space
optionWorld-Space
. PReviously options were limited toView-Space
andModel-Space
. -
SkeletonGraphic
now fully supportsSkeletonUtility
for generating a hierarchy ofSkeletonUtilityBones
in both modesFollow
andOverride
. This also enables creating hinge chain physics rigs and usingSkeletonUtilityConstraints
such asSkeletonUtilityGroundConstraint
andSkeletonUtilityEyeConstraint
onSkeletonGraphic
. -
Added native support for slot blend modes
Additive
,Multiply
andScreen
with automatic assignment at newly imported skeleton assets.BlendModeMaterialAssets
are now obsolete and replaced by the native properties atSkeletonDataAsset
. TheSkeletonDataAsset
Inspector provides a newBlend Modes - Upgrade
button to upgrade an obsoleteBlendModeMaterialAsset
to the native blend modes properties. This upgrade will be performed automatically on imported and re-imported assets. -
BoneFollower
andBoneFollowerGraphic
components now provide better support for following bones when the skeleton's Transform is not the parent of the follower's Transform. Previously e.g. rotating a common parent Transform did not lead to the desired result, as well as negatively scaling a skeleton's Transform when it is not a parent of the follower's Transform. -
Linear color space: Previously Slot colors were not displayed the same in Unity as in the Spine Editor (when configured to display as
Linear
color space in Spine Editor Settings). This is now fixed at all shaders, including URP and LWRP shaders. -
All Spine shaders (also including URP and LWRP shaders) now support
PMA Vertex Colors
in combination withLinear
color space. Thus when using Spine shaders, you should always enablePMA Vertex Colors
at theSkeletonRenderer
component. This allows using single passAdditive
Slots rendering. Note that textures shall still be exported asStraight alpha
when usingLinear
color space, so combinePMA Vertex Colors
withStraight Texture
. AllSprite
shaders now provide an additional blend mode for this, namedPMA Vertex, Straight Texture
which shall be the preferred Sprite shader blend mode inLinear
color space. -
Additive Slots have always been lit before they were written to the target buffer. Now all lit shaders provide an additional parameter
Light Affects Additive
which defaults tofalse
, as it is the more intuitive default value. You can enable the old behaviour by setting this parameter totrue
. -
SkeletonRootMotion
andSkeletonMecanimRootMotion
components now support arbitrary bones in the hierarchy asRoot Motion Bone
. Previously there were problems when selecting a non-root bone asRoot Motion Bone
.Skeleton.ScaleX
and.ScaleY
and parent bone scale is now respected as well. -
URP and LWRP
Sprite
andSkeletonLit
shaders no longer requireAdvanced - Add Normals
enabled to properly cast and receive shadows. It is recommended to disableAdd Normals
if normals are otherwise not needed. -
Added an example component
RootMotionDeltaCompensation
located inSpine Examples/Scripts/Sample Components
which can be used for applying simple delta compensation. You can enable and disable the component to toggle delta compensation of the currently playing animation on and off. -
SkeletonRagdoll
andSkeletonRagdoll2D
now support bone scale at any bone in the skeleton hierarchy. This includes negative scale and root bone scale. -
Attachment.GetRemappedClone(Sprite)
method now provides an additional optional parameteruseOriginalRegionScale
. When set totrue
, the replaced attachment's scale is used instead of the Sprite'sPixel per Unity
setting, allowing for more consistent scaling. Note: When remapping Sprites, be sure to set the Sprite'sMesh Type
toFull Rect
and notTight
, otherwise the scale will be wrong. -
SkeletonGraphic
now supports all Slot blend modes whenAdvanced - Multiple Canvas Renderers
is enabled in the Inspector. TheSkeletonGraphic
Inspector now provides aBlend Mode Materials
section where you can assignSkeletonGraphic
materials for each blend mode, or use the new default materials. NewSkeletonGraphic
shaders and materials have been added for each blend mode. TheBlendModes.unity
example scene has been extended to demonstrate this new feature. For detailed information see theSkeletonGraphic documentation page
. -
Timeline clips now also offer
Don't End with Clip
andClip End Mix Out Duration
parameters. By default when empty space follows the clip on the timeline, the empty animation is set on the track with a MixDuration ofClip End Mix Out Duration
. SetDon't End with Clip
totrue
to continue playing the clip's animation instead and mimic the old 3.8 behaviour. If you prefer pausing the animation instead of mixing out to the empty animation, setClip End Mix Out Duration
to a value less than 0, then the animation is paused instead. -
Prefabs containing
SkeletonRenderer
,SkeletonAnimation
andSkeletonMecanim
now provide a proper Editor preview, including the preview thumbnail. -
SkeletonRenderer
(and subclassesSkeletonAnimation
andSkeletonMecanim
) now provide a propertyAdvanced - Fix Prefab Override MeshFilter
, which when enabled fixes the prefab always being marked as changed. It sets the MeshFilter's hide flags toDontSaveInEditor
. Unfortunately this comes at the cost of references to theMeshFilter
by other components being lost, therefore this parameter defaults tofalse
to keep the safe existing behaviour. -
BoundingBoxFollower
andBoundingBoxFollowerGraphic
now provide previously missingusedByEffector
andusedByComposite
parameters to be set at all generated colliders. -
BoneFollower
andBoneFollowerGraphic
now provide an additionalFollow Parent World Scale
parameter to allow following simple scale of parent bones (rotated/skewed scale can't be supported). -
Improved
Advanced - Fix Prefab Override MeshFilter
property forSkeletonRenderer
(and subclassesSkeletonAnimation
andSkeletonMecanim
), now providing an additional option to use a global value which can be set inEdit - Preferences - Spine
. -
Timeline naming improvements:
Spine AnimationState Clip
Inspector parameterCustom Duration
changed and inverted toDefault Mix Duration
for more clarity. Shortened all Timeline add track menu entries from:Spine.Unity.Playables - <track type>
toSpine - <track type>
,Spine Animation State Track
toSkeletonAnimation Track
,Spine AnimationState Graphic Track
toSkeletonGraphic Track
, andSpine Skeleton Flip Track
toSkeleton Flip Track
. -
Timeline track appearance and Inspector: Tracks now show icons and track colors to make them easier to distinguish. When a Track is selected, the Inspector now shows an editable track name which was previously only editable at the Timeline asset.
-
Added example component
SkeletonRenderTexture
to render aSkeletonRenderer
to aRenderTexture
, mainly for proper transparency. Added an example scene namedRenderTexture FadeOut Transparency
that demonstrates usage for a fadeout transparency effect. -
Added another fadeout example component named
SkeletonRenderTextureFadeout
which takes over transparency fadeout when enabled. You can use this component as-is, attach it in disabled state and enable it to start a fadeout effect. -
Timeline clips now offer an additional
Alpha
parameter for setting a custom constant mix alpha value other than 1.0, just asTrackEntry.Alpha
. Defaults to 1.0. -
SkeletonGraphic
now provides additional render callback delegatesOnInstructionsPrepared
,AssignMeshOverrideSingleRenderer
andAssignMeshOverrideMultipleRenderers
.OnInstructionsPrepared
is raised at the end of LateUpdate after render instructions are done, target renderers are prepared, and the mesh is ready to be generated. The twoAssignMeshOverride
delegates allow separate code to take over mesh and material assignment of aSkeletonGraphic
component. -
Added example component
SkeletonGraphicRenderTexture
to render aSkeletonGraphic
to aRenderTexture
(similar asSkeletonRenderTexture
), mainly for proper transparency. Extended example sceneRenderTexture FadeOut Transparency
accordingly.
-
-
Changes of default values
-
Deprecated
-
Restructuring (Non-Breaking)
- Added normalmap support via
SpineEffectNormalmap
and support for loading multiple texture layers following a suffix-pattern. Please see the example code on how to use them. - Added
Z
property toSkeletonRenderer
to provide a constant Z offset that's added to all vertices. - Added
ZSpacing
property toSkeletonRenderer
to allow specifying the distance on the z-axis between attachments. - SkeletonDebugRenderer bone color attributes are now public and modifiable by user.
- Timeline API has been extended to support component-wise timelines exported by Spine 4.0.
- Added
AnimationState.clearNext()
which removes the givenTrackEntry
and all entries after it. - Added support for texture atlas key value pairs, see
Region.names
andRegion.values
. - Added support for reverse animation playback via
TrackEntry.getReverse()
andTrackEntry.setReverse()
. - Added proportional spacing mode support for path constraints.
- Added support for uniform scaling for two bone IK.
- Fixed applying a constraint reverting changes from other constraints.
- Breaking change: Removed
SkeletonData
andSkeleton
methods:findBoneIndex
,findSlotIndex
. Bones and slots have anindex
field that should be used instead.
- Exposed colors in
SkeletonRendererDebug
. - Updated to libGDX 1.10.0.
- Expose non-essential colors on bones, bounding box, clipping, and path attachments.
- Timeline API has been extended to support component-wise timelines exported by Spine 4.0.
- Added
AnimationState.clearNext()
which removes the givenTrackEntry
and all entries after it. - Added support for texture atlas key value pairs, see
AtlasRegion.names
andAtlasRegion.values
. - Added support for reverse animation playback via
TrackEntry.reverse
. - Added proportional spacing mode support for path constraints.
- Added support for uniform scaling for two bone IK.
- Fixed applying a constraint reverting changes from other constraints.
- Breaking change: spine-corona has been renamed to spine-solar2d. Change your
require "spine-corona.spine"
statements torequire "spine-solar2d.spine"
- Breaking change: refactored to ECMAScript modules. See this blog post as well as the updated README.md.
- Breaking change: the
build/
folder and compiled artifacts are no longer part of the repository. Instead,npm run build
inspine-ts/
to generate ECMAScript modules and IIFE modules inspine-<module-name>/dist
. - Breaking change: the
.npmignore
andpackage.json
files in the root directory have been deleted. Use the corresponding files inspine-ts/
instead, or better, depend on the packages from the NPM registry. - Updated runtime to be compatible with TypeScript 3.6.3.
- Added
AssetManager#setRawDataURI(path, data)
. Allows to set raw data URIs for a specific path, which in turn enables embedding assets into JavaScript/HTML. - Expose non-essential colors on bones, bounding box, clipping, and path attachments.
- Timeline API has been extended to support component-wise timelines exported by Spine 4.0.
- Added
AnimationState.clearNext()
which removes the givenTrackEntry
and all entries after it. - Added support for texture atlas key value pairs, see
AtlasRegion.names
andAtlasRegion.values
. - Added support for reverse animation playback via
TrackEntry.reverse
. - Added proportional spacing mode support for path constraints.
- Added support for uniform scaling for two bone IK.
- Fixed applying a constraint reverting changes from other constraints.
AssetManager
constructor now takes an optionDownloader
instance. Used to download assets only once and share them betweenAssetManager
instances.- Added web worker support to
AssetManager
. - Added various default parameters to
AnimationState
methods for ease of use. - Added
SpineCanvas
, a simpler way to render a scene via spine-webgl. Seespine-ts/spine-webgl/examples/barebones.html
andspine-ts/spine-webgl/examples/mix-and-match.html
.
- Breaking change: removed
SharedAssetManager
. UseAssetManager
with a sharedDownloader
instance instead. - Breaking change: the global object
spine.webgl
no longer exists. All classes and functions are now exposed on the globalspine
object directly. Simply replace any reference tospine.webgl.
in your source code withspine.
.
- Renderer now accounts for whitespace stripping.
- Breaking change: the global object
spine.canvas
no longer exists. All classes and functions are now exposed on the globalspine
object directly. Simply replace any reference tospine.canvas.
in your source code withspine.
.
SkeletonMesh
now takes an optionalSkeletonMeshMaterialParametersCustomizer
function that allows you to modify theShaderMaterialParameters
before the material is finalized. Use it to modify things like THREEJS'Material.depthTest
etc. See #1590.- Breaking change: the global object
spine.canvas
no longer exists. All classes and functions are now exposed on the globalspine
object directly. Simply replace any reference tospine.threejs.
in your source code withspine.
. - Breaking change: the default fragment shader of
SkeletonMeshMaterial
now explicitely discards fragments with alpha < 0.5. See #1985 - Breaking change: reversal of the previous breaking change: the default fragment shader of
SkeletonMeshMaterial
does no longer discard fragments with alpha < 0.5. Pass aSkeletonMeshMaterialParametersCustomizer
to theSkeletonMesh
constructor, and modifyparameters.alphaTest
to be > 0.
- Added
SpinePlayerConfig.rawDataURIs
. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file. See the example for a demonstration. - Added
SpinePlayerConfig.frame
. If set, the callback is called each frame, before the skeleton is posed or drawn. - Added
SpinePlayerConfig.update
. If set, the callback is called each frame, just after the skeleton is posed. - Added
SpinePlayerConfig.draw
. If set, the callback is called each frame, just after the skeleton is drawn. - Added
SpinePlayerConfig.downloader
. Thespine.Downloader
instance can be shared between players so assets are only downloaded once. - If
SpinePlayerConfig.jsonURL
ends with an anchor, the anchor text is used to find the skeleton in the specified JSON file. - Added
SpinePlayer.dispose()
, disposes all CPU and GPU side resources, removes all listeners, and removes the player DOM from the parent.
-
Breaking changes
- Renamed
Slot#getAttachmentVertices()
toSlot#getDeform()
. - Changed the
.json
curve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin#addAttachment()
toSkin#setAttachment()
. - Removed
VertexAttachment#applyDeform()
and replaced it withVertexAttachment#deformAttachment
. The attachment set on this field is used to decide if aDeformTimeline
should be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeform
field, getter, and setter fromMeshAttachment
. - Changed
.skel
binary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.json
and.skel
file formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes. - Switched projects from FDT to Visual Studio Code. See updated
README.md
files for instructions.
- Renamed
-
Additions
- Added
SkeletonBinary
to load binary.skel
files. SeeMixAndMatchExample.as
inspine-startling-example
. - Added
x
andy
coordinates for setup pose AABB inSkeletonData
. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments()
. Returns all attachments in the skin. - Added
Skin#getAttachments(int slotIndex)
. Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachment
are shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment#copy()
to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh()
, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
- Added
MixAndMatchExample.as
to demonstrate the new Skin API additions and how to load binary.skel
files. - Switched projects from FDT to Visual Studio Code. See updated
README.md
files for instructions.
-
Breaking changes
- Renamed
spSlot#attachmentVertices
tospSlot#deform
. - Changed the
.json
curve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
spSkin_addAttachment()
toSkin#spSkin_addAttachment()
. - Removed
spVertexAttachment_applyDeform()
and replaced it withVertexAttachment#deformAttachment
. The attachment set on this field is used to decide if aspDeformTimeline
should be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeform
field, getter, and setter fromspMeshAttachment
. - Changed
.skel
binary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.json
and.skel
file formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
- Added
x
andy
coordinates for setup pose AABB inspSkeletonData
. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
spSkin_getAttachments()
. Returns all attachments in the skin. - Added
spSkin_getAttachments(int slotIndex)
. Returns all attachements in the skin for the given slot index. - Added
spSkin_addSkin(spSkin* skin)
. Adds all attachments, bones, and skins from the specified skin to this skin. - Added
spSkin_copySkin(spSkin* skin)
. Adds all attachments, bones, and skins from the specified skin to this skin.spVertexAttachment
are shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied. - All attachments inserted into skins are reference counted. When the last skin referencing an attachment is disposed, the attachment will also be disposed.
- Added
- Added
spAttachment_copy()
to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
spMeshAttachment_newLinkedMesh()
, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
- Added mix-and-match example to demonstrate the new Skin API.
- Added
IKExample
. - Added
SkeletonAnimation preUpdateWorldTransformsListener
andSkeletonAnimation postUpdateWorldTransformsListener
. When set, these callbacks will be invokved before and after the skeleton'supdateWorldTransforms()
method is called. See theIKExample
how it can be used.
- Added mix-and-match example to demonstrate the new Skin API.
- Added
IKExample
.
-
Breaking Changes
- Renamed
Slot::getAttachmentVertices()
toSlot::getDeform()
. - Changed the
.json
curve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin::addAttachment()
toSkin::setAttachment()
. - Removed
VertexAttachment::applyDeform()
and replaced it withVertexAttachment::getDeformAttachment()
. The attachment set on this field is used to decide if aDeformTimeline
should be applied to the attachment active on the slot to which the timeline is applied. - Removed
_inheritDeform
field, getter, and setter fromMeshAttachment
. - Changed
.skel
binary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.json
and.skel
file formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
AnimationState
andTrackEntry
now also accept a subclass ofAnimationStateListenerObject
as a listener for animation events in the overloadedsetListener()
method.SkeletonBinary
andSkeletonJson
now parse and set all non-essential data like audio path.- Added
x
andy
coordinates for setup pose AABB inSkeletonData
. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments()
. Returns all attachments in the skin. - Added
Skin#getAttachments(int slotIndex)
. Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(Skin &skin)
. Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(Skin &skin)
. Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachment
are shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied. - All attachments inserted into skins are reference counted. When the last skin referencing an attachment is disposed, the attachment will also be disposed.
- Added
- Added
Attachment#copy()
to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh()
, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Exposed
x
andy
onSkeletonData
through getters and setters.
- Updated to cocos2d-x 3.17.1
- Added mix-and-match example to demonstrate the new Skin API.
- Exmaple project requires Visual Studio 2019 on Windows
- Added
IKExample
. - Added
SkeletonAnimation::setPreUpdateWorldTransformsListener()
andSkeletonAnimation::setPreUpdateWorldTransformsListener()
. When set, these callbacks will be invokved before and after the skeleton'supdateWorldTransforms()
method is called. See theIKExample
how it can be used.
- Added mix-and-match example to demonstrate the new Skin API.
- Added
bAutoPlaying
flag toUSpineSkeletonAnimationComponent
. Whenfalse
, the component will not update the internal animation state and skeleton. - Updated example project to UE 4.22.
- (Re-)Importing Spine assets will perform a version compatibility check and alert users about mismatches in editor mode.
USpineSkeletonRendererComponent
allows passing aUSpineSkeletonComponent
to update it. This way, the renderer component can be used without a skeleton component on the same actor.- Added blueprint-callable methods to
SpineSkeletonComponent
andSpineSkeletonAnimationComponent
to query and set skins, and enumerate bones, slots, and animations. - Extended skeleton data editor preview. The preview now shows bones, slots, animations, and skins found in the skeleton data. See this blog post.
- Added preview animation and skin fields, allowing you to preview animations and skins right in the editor. See this blog post.
- Removed dependency on
RHI
,RenderCore
, andShaderCore
. - Re-importing atlases and their textures now works consistently in all situations.
- Added mix-and-match example to demonstrate the new Skin API.
- Materials on
SkeletonRendererComponent
are now blueprint read and writeable. This allows setting dynamic material instances at runtime. - Added
InitialSkin
property toUSpineWidget
. This allows previewing different skins in the UMG Designer. Initial skins can still be overridden via blueprint events such asOn Initialized
. USpineWidget
will now report its own desired size based on the setup pose dimensions of the skeleton. This is used when selectingSize to content
on aUSpineWidget
in the designer.- Updated example project to UE 5.2.
-
Breaking changes
- Changed
IkConstraintData.Bones
type fromList<BoneData>
toExposedList<BoneData>
for unification reasons. Note: this modification will most likely not affect user code. - Renamed
Slot.AttachmentVertices
toSlot.Deform
. - Changed the
.json
curve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin.AddAttachment()
toSkin.SetAttachment()
. - Removed
FindAttachmentsForSlot(int slotIndex, List<Attachment> attachments)
andFindNamesForSlot (int slotIndex, List<string> names)
and replaced it withSkin.GetAttachments(int slotIndex, List<SkinEntry> attachments)
which returns the combinedSkinEntry
object holding both name and attachment. - Removed
VertexAttachment.ApplyDeform()
and replaced it withVertexAttachment.DeformAttachment
. The attachment set on this field is used to decide if aDeformTimeline
should be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeform
field, getter, and setter fromMeshAttachment
. - Changed
.skel
binary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.json
and.skel
file formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Changed
-
Additions
- Added
x
andy
coordinates for setup pose AABB inSkeletonData
. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin.GetAttachments()
. Returns all attachments in the skin. - Added
Skin.GetAttachments(int slotIndex, List<SkinEntry> attachments)
. Returns all attachements in the skin for the given slot index. This method replacesFindAttachmentsForSlot
andFindNamesForSlot
. - Added
Skin.AddSkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin.CopySkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachment
are shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment.Copy()
to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment.NewLinkedMesh()
, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
-
Breaking changes
- Officially supported Unity versions are 2017.1-2020.2.
- Spine
.asmdef
files are again active by default. They have previously been deactivated to.txt
extension which is now no longer necessary. - Removed PoseSkeleton() and PoseWithAnimation() extension methods to prevent issues where animations are not mixed out. Problem was that these methods did not set AnimationState, leaving incorrect state at e.g. attachments enabled at slots when starting subsequent animations. As a replacement you can use
AnimationState.ClearTrack(0);
followed byvar entry = AnimationState.SetAnimation(0, animation, loop); entry.TrackTime = time
to achieve similar behaviour. - The
Shadow alpha cutoff
shader parameter is now respecting slot-color alpha values at all Spine shaders. A fragment's texture color alpha is multiplied with slot-color alpha before the result is tested against theShadow alpha cutoff
threshold. - Removed redundant
Attachment.GetClone()
andMeshAttachment.GetLinkedClone()
extension methods. Use methodsAttachment.Copy
andMeshAttachment.NewLinkedMesh()
instead. - Renamed extension method
Attachment.GetClone(bool cloneMeshesAsLinked)
toAttachment.GetCopy(bool cloneMeshesAsLinked)
to follow the naming scheme of the Spine API. SkeletonDataAsset.atlasAssets
is now an array of the base classAtlasAssetBase
instead ofSpineAtlasAsset
, which providesIEnumerable<> Materials
instead ofList<> materials
. Replace any access viaatlasAsset.materials[0]
withatlasAsset.Materials.First()
and add ausing System.Linq;
statement.- Changed
MeshAttachment.GetLinkedMesh()
method signatures: removed optional parametersbool inheritDeform = true, bool copyOriginalProperties = false
. - Changed namespace
Spine.Unity.Modules
toSpine.Unity
andSpine.Unity.Examples
after restructuring (see section below) in respective classes:- When receiving namespace related errors, replace using statements of
using Spine.Unity.Modules.AttachmentTools;
withusing Spine.Unity.AttachmentTools;
. You can removeusing Spine.Unity.Modules;
statements when ausing Spine.Unity
statement is already present in the file. AttachmentTools
,SkeletonPartsRenderer
,SkeletonRenderSeparator
,SkeletonRendererCustomMaterials
changed to namespaceSpine.Unity
.SkeletonGhost
,SkeletonGhostRenderer
,AtlasRegionAttacher
,SkeletonGraphicMirror
,SkeletonRagdoll
,SkeletonRagdoll2D
,SkeletonUtilityEyeConstraint
,SkeletonUtilityGroundConstraint
,SkeletonUtilityKinematicShadow
changed to namespaceSpine.Unity.Examples
.
- When receiving namespace related errors, replace using statements of
- Split
Editor/Utility/SpineEditorUtilities
class into multiple files with partial class qualifier.- Nested classes
SpineEditorUtilities.AssetUtility
andSpineEditorUtilities.EditorInstantiation
are now no longer nested. If you receive namespace related errors, replace any occurrance ofSpineEditorUtilities.AssetUtility
withAssetUtility
andSpineEditorUtilities.EditorInstantiation
withEditorInstantiation
.
- Nested classes
- Timeline Support has been moved to a separate UPM Package Previously the Spine Timeline integration was located in the
Modules/Timeline
directory and was deactivated by default, making it necessary to activate it via the Spine Preferences. Now the Timeline integration has been moved to an additional UPM package which can be found underModules/com.esotericsoftware.spine.timeline
. - Installation: You can download the Unity Package Manager (UPM) package via the download page or find it in the spine-runtimes/spine-unity/Modules subdirectory on the git repository. You can then either unzip (copy if using git) the package to
a) the
Packages
directory in your project where it will automatically be loaded, or b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the+
icon, chooseAdd package from disk..
and point it to the package.json file. The Project panel should now show an entrySpine Timeline Extensions
underPackages
. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. SkeletonMecanim
'sLayer Mix Mode
enum nameMixMode.SpineStyle
has been renamed toMixMode.Hard
. This is most likely not set via code and thus unlikely to be a problem. Serialized scenes and prefabs are unaffected.SkeletonRootMotion
andSkeletonMecanimRootMotion
components now support arbitrary bones in the hierarchy asRoot Motion Bone
. Previously there were problems when selecting a non-root bone asRoot Motion Bone
.Skeleton.ScaleX
and.ScaleY
and parent bone scale is now respected as well.
-
Additions
-
Spine Preferences stored in Assets/Editor/SpineSettings.asset Now Spine uses the new
SettingsProvider
API, storing settings in a SpineSettings.asset file which can be shared with team members. Your old preferences are automatically migrated to the new system. -
Added support for Unity's SpriteMask to
SkeletonAnimation
andSkeletonMecanim
. All mask interaction modes are supported. See this blog post. -
Added support for Unity's RectMask2D to SkeletonGraphics. See this blog post.
-
Added
Create 2D Hinge Chain
button atSkeletonUtilityBone
inspector, previously onlyCreate 3D Hinge Chain
was available. -
Now supporting Lightweight Render Pipeline (LWRP) through an additional UPM package.
-
Installation: You can download the Unity Package Manager (UPM) package via the download page or find it in the spine-runtimes/spine-unity/Modules subdirectory on the git repository. You can then either unzip (copy if using git) the package to
- a) the
Packages
directory in your project where it will automatically be loaded, or - b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the
+
icon, chooseAdd package from disk..
and point it to the package.json file.
If you are using git and Unity 2019.2 or newer versions and receive an error that dependencies could not be resolved by the package manager (only higher versions of Unity's
Lightweight RP
package are available, e.g.6.9.0
and up), please copy the prepared package-UNITYVERSION.json file for your Unity version (e.g.package-2019.2.json
) over the existing package.json file to change the dependency accordingly. Unfortunately Unity's Package Manager does not provide a way to specify a version range for a dependency like "5.7.2 - 6.9.0" yet, so this manual step is necessary for git users.The Project panel should now show an entry
Spine Lightweight RP Shaders
underPackages
. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. - a) the
-
Usage: The package provides two shaders specifically built for the lightweight render pipeline:
Lightweight Render Pipeline/Spine/Skeleton
, as a lightweight variant of theSpine/Skeleton
shader,Lightweight Render Pipeline/Spine/Skeleton Lit
, as a lightweight variant of theSpine/Skeleton Lit
shader andLightweight Render Pipeline/Spine/Sprite
, as a lightweight variant of theSpine/Sprite/Vertex Lit
andPixel Lit
shaders, which were not functioning in the lightweight render pipeline. The shaders can be assigned to materials as usual and will respect your settings of the assignedLightweightRenderPipelineAsset
underProject Settings - Graphics
.
-
Restrictions As all Spine shaders, the LWRP shaders do not support
Premultiply alpha
(PMA) atlas textures in Linear color space. Please export your atlas textures asstraight alpha
textures with disabledPremultiply alpha
setting when using Linear color space. You can check the current color space viaProject Settings - Player - Other Settings - Color Space.
. -
Example: You can find an example scene in the package under
com.esotericsoftware.spine.lwrp-shaders-3.8/Examples/LWRP Shaders.unity
that demonstrates usage of the LWRP shaders.
-
-
Added
Spine/Skeleton Lit ZWrite
shader. This variant of theSpine/Skeleton Lit
shader writes to the depth buffer with configurable depth alpha threshold. Apart from that it is identical toSpine/Skeleton Lit
. -
Additional yield instructions to wait for animation track events
End
,Complete
andInterrupt
.WaitForSpineAnimationComplete
now proves an additionalbool includeEndEvent
parameter, defaults tofalse
(previous behaviour).- Added a new
WaitForSpineAnimationEnd
yield instruction. - Added a new generic
WaitForSpineAnimation
yield instruction which can be configured to wait for any combination of animation track events. It is now used as base class forWaitForSpineAnimationComplete
andWaitForSpineAnimationEnd
.
-
Additional Fix Draw Order parameter at SkeletonRenderer, defaults to
disabled
(previous behaviour). Applies only when 3+ submeshes are used (2+ materials with alternating order, e.g. "A B A"). If true, MaterialPropertyBlocks are assigned at each material to prevent aggressive batching of submeshes by e.g. the LWRP renderer, leading to incorrect draw order (e.g. "A1 B A2" changed to "A1A2 B"). You can leave this parameter disabled when everything is drawn correctly to save the additional performance cost. -
Additional Timeline features. SpineAnimationStateClip now provides a
Speed Multiplier
, a start time offset parameterClip In
, support for blending successive animations by overlapping tracks. An additionalUse Blend Duration
parameter (defaults to true) allows for automatic synchronisation of MixDuration with the current overlap blend duration. An additional Spine preferences parameterUse Blend Duration
has been added which can be disabled to default to the previous behaviour before this update. -
Additional
SpriteMask and RectMask2D
example scene added for demonstration of mask setup and interaction. -
Real physics hinge chains
for both 2D and 3D physics. The SkeletonUtilityBone Inspector provides an interface to create 2D and 3D hinge chains. Previously created chains have only been respecting gravity, but not momentum of the skeleton or parent bones. The new physics rig created when pressingCreate 3D Hinge Chain
andCreate 2D Hinge Chain
creates a more complex setup that also works when flipping the skeleton. Note that the chain root node is no longer parented to bones of the skeleton. This is a requirement in Unity to have momentum applied properly - do not reparent the chain root to bones of your skeleton, or you will loose any momentum applied by the skeleton's movement. -
Outline rendering functionality for all shaders.
Every shader now provides an additional set ofOutline
parameters to enable custom outline rendering. When outline rendering is enabled via theMaterial
inspector, it automatically switches the shader to the respectiveSpine/Outline
shader variant. Outlines are generated by sampling neighbour pixels, so be sure to add enough transparent padding when exporting your atlas textures to fit the desired outline width. In order to enable outline rendering at a skeleton, it is recommended to first prepare an additional outline material copy and then switch the material of the target skeleton to this material. This prevents unnecessary additional runtime material copies and drawcalls. Material switching can be prepared via a SkeletonRendererCustomMaterials component and then enabled or disabled at runtime. Alternatively, you can also directly modify theSkeletonRenderer.CustomMaterialOverride
property. Outline rendering is fully supported onSkeletonGraphic
shaders as well. -
Added
SkeletonRenderer.EditorSkipSkinSync
scripting API property to be able to set custom skins in editor scripts. Enable this property when overwriting the Skeleton's skin from an editor script. Without setting this parameter, changes will be overwritten by the next inspector update. Only affects Inspector synchronisation of skin withinitialSkinName
, not startup initialization. -
All
Spine/SkeletonGraphic
shaders now provide a parameterCanvasGroup Compatible
which can be enabled to supportCanvasGroup
alpha blending. For correct results, you should then disablePma Vertex Colors
in theSkeletonGraphic
Inspector, in sectionAdvanced
(otherwise Slot alpha will be applied twice). -
Now supporting Universal Render Pipeline (URP), including the 2D Renderer pipeline, through an additional UPM package.
-
Installation: You can download the Unity Package Manager (UPM) package via the download page or find it in the spine-runtimes/spine-unity/Modules subdirectory on the git repository. You can then either unzip (copy if using git) the package to
- a) the
Packages
directory in your project where it will automatically be loaded, or - b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the
+
icon, chooseAdd package from disk..
and point it to the package.json file.
The Project panel should now show an entry
Spine Universal RP Shaders
underPackages
. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. - a) the
-
Usage: The package provides two shaders specifically built for the universal render pipeline:
Universal Render Pipeline/Spine/Skeleton
, as a universal variant of theSpine/Skeleton
shader,Universal Render Pipeline/Spine/Skeleton Lit
, as a universal variant of theSpine/Skeleton Lit
shader,Universal Render Pipeline/Spine/Sprite
, as a universal variant of theSpine/Sprite/Vertex Lit
andPixel Lit
shaders, which were not functioning in the universal render pipeline,
-
Universal Render Pipeline/2D/Spine/Skeleton Lit
, as a universal 2D Renderer variant of theSpine/Skeleton Lit
shader, andUniversal Render Pipeline/2D/Spine/Sprite
, as a universal 2D Renderer variant of theSpine/Sprite/Vertex Lit
andPixel Lit
shaders. The shaders can be assigned to materials as usual and will respect your settings of the assignedUniversalRenderPipelineAsset
underProject Settings - Graphics
.
-
Restrictions As all Spine shaders, the URP shaders do not support
Premultiply alpha
(PMA) atlas textures in Linear color space. Please export your atlas textures asstraight alpha
textures with disabledPremultiply alpha
setting when using Linear color space. You can check the current color space viaProject Settings - Player - Other Settings - Color Space.
. -
Example: You can find an example scene in the package under
com.esotericsoftware.spine.urp-shaders-3.8/Examples/URP Shaders.unity
that demonstrates usage of the URP shaders.
-
-
Spine Preferences now provide an
Atlas Texture Settings
parameter for applying customizable texture import settings at all newly imported Spine atlas textures. When exporting atlas textures from Spine withPremultiply alpha
enabled (the default), you can leave it atPMATexturePreset
. If you have disabledPremultiply alpha
, set it to the includedStraightAlphaTexturePreset
asset. You can also create your ownTextureImporter
Preset
asset and assign it here (includePMA
orStraight
in the name). In Unity versions before 2018.3 you can useTexture2D
template assets instead of the newerPreset
assets. Materials created for imported textures will also have theStraight Alpha Texture
parameter configured accordingly. -
All
Sprite
shaders (including URP and LWRP extension packages) now provide an additionalFixed Normal Space
optionWorld-Space
. PReviously options were limited toView-Space
andModel-Space
. -
SkeletonGraphic
now fully supportsSkeletonUtility
for generating a hierarchy ofSkeletonUtilityBones
in both modesFollow
andOverride
. This also enables creating hinge chain physics rigs and usingSkeletonUtilityConstraints
such asSkeletonUtilityGroundConstraint
andSkeletonUtilityEyeConstraint
onSkeletonGraphic
. -
Added
OnMeshAndMaterialsUpdated
callback event toSkeletonRenderer
andSkeletonGraphic
. It is issued at the end ofLateUpdate
, before rendering. -
Added
Skeleton-OutlineOnly
single pass shader to LWRP and URP extension modules. It can be assigned to materials asUniversal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly
. This allows for separate outline child GameObjects that reference the existing Mesh of their parent, and re-draw the mesh using this outline shader. -
Added example component
RenderExistingMesh
to render a mesh again with different materials, as required by the newSkeleton-OutlineOnly
shaders. In URP the outline has to be rendered via a separate GameObject as URP does not allow multiple render passes. To add an outline to your SkeletenRenderer:- Add a child GameObject and move it a bit back (e.g. position Z = 0.01).
- Add a
RenderExistingMesh
component, provided in theSpine Examples/Scripts/Sample Components
directory. - Copy the original material, add _Outline to its name and set the shader to
Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly
. - Assign this _Outline material at the
RenderExistingMesh
component under Replacement Materials.
-
Added
Outline Shaders URP
example scene to URP extension module to demonstrate the above additions. -
Added support for Unity's
SpriteAtlas
as atlas provider (as an alternative to.atlas.txt
and.png
files) alongside a skeleton data file. There is now an additionalSpine SpriteAtlas Import
tool window accessible viaWindow - Spine - SpriteAtlas Import
. Additional information can be found in a new section on the spine-unity documentation page. -
Added support for multiple atlas textures at
SkeletonGraphic
. You can enable this feature by enabling the parameterMultiple CanvasRenders
in theAdvanced
section of theSkeletonGraphic
Inspector. This automatically creates the required number of childCanvasRenderer
GameObjects for each required draw call (submesh). -
Added support for Render Separator Slots at
SkeletonGraphic
. Render separation can be enabled directly in theAdvanced
section of theSkeletonGraphic
Inspector, it does not require any additional components (likeSkeletonRenderSeparator
orSkeletonPartsRenderer
forSkeletonRenderer
components). When enabled, additional separator GameObjects will be created automatically for each separation part, andCanvasRenderer
GameObjects re-parented to them accordingly. The separator GameObjects can be moved around and re-parented in the hierarchy according to your requirements to achieve the desired draw order within yourCanvas
. A usage example can be found in the updatedSpine Examples/Other Examples/SkeletonRenderSeparator
scene. -
Added
SkeletonGraphicCustomMaterials
component, providing functionality to override materials and textures of aSkeletonGraphic
, similar toSkeletonRendererCustomMaterials
. Note: overriding materials or textures per slot is not provided due to structural limitations. -
Added Root Motion support for
SkeletonAnimation
,SkeletonMecanim
andSkeletonGraphic
via new componentsSkeletonRootMotion
andSkeletonMecanimRootMotion
. TheSkeletonAnimation
andSkeletonGraphic
component Inspector now provides a lineRoot Motion
withAdd Component
andRemove Component
buttons to add/remove the newSkeletonRootMotion
component to your GameObject. TheSkeletonMecanim
Inspector detects whether root motion is enabled at theAnimator
component and adds aSkeletonMecanimRootMotion
component automatically. -
SkeletonMecanim
now provides an additionalCustom MixMode
parameter underMecanim Translator
. It is enabled by default in version 3.8 to maintain current behaviour, using the setMix Mode
for each Mecanim layer. When disabled,SkeletonMecanim
will use the recommendedMixMode
according to the layer blend mode. Additional information can be found in the Mecanim Translator section on the spine-unity documentation pages. -
Added SkeletonGraphic Timeline support. Added supprot for multi-track Timeline preview in the Editor outside of play mode (multi-track scrubbing). See the Timeline-Extension-UPM-Package section of the spine-unity documentation for more information.
-
Added support for double-sided lighting at all
SkeletonLit
shaders (including URP and LWRP packages). -
Added frustum culling update mode parameters
Update When Invisible
(Inspector parameter) andUpdateMode
(available via code) to all Skeleton components. This provides a simple way to disable certain updates when theRenderer
is no longer visible (outside all cameras, culled in frustum culling). The newUpdateMode
property allows disabling updates at a finer granularity level than disabling the whole component. Available modes are:Nothing
,OnlyAnimationStatus
,EverythingExceptMesh
andFullUpdate
. -
Added a new
Spine/Outline/OutlineOnly-ZWrite
shader to provide correct outline-only rendering. Note: the shader requires two render passes and is therefore not compatible with URP. TheSpine Examples/Other Examples/Outline Shaders
example scene has been updated to demonstrate the new shader. -
Added
OnMeshAndMaterialsUpdated
callback event toSkeletonRenderSeparator
andSkeletonPartsRenderer
. It is issued at the end ofLateUpdate
, before rendering. -
Added
Root Motion Scale X/Y
parameters toSkeletonRootMotionBase
subclasses (SkeletonRootMotion
andSkeletonMecanimRootMotion
). Also providingAdjustRootMotionToDistance()
and other methods to allow for easy delta compensation. Delta compensation can be used to e.g. stretch a jump to a given distance. Root motion can be adjusted at the start of an animation or every frame viaskeletonRootMotion.AdjustRootMotionToDistance(targetPosition - transform.position, trackIndex);
. -
Now providing a
Canvas Group Tint Black
parameter at theSkeletonGraphic
Inspector in theAdvanced
section. When using theSpine/SkeletonGraphic Tint Black
shader you can enable this parameter to receive proper blending results when usingAdditive
blend mode under aCanvasGroup
. Be sure to also have the parameterCanvasGroup Compatible
enabled at the shader. Note that the normalSpine/SkeletonGraphic
does not supportAdditive
blend mode at aCanvasGroup
, as it requires additional shader channels to work. -
Added
Mix and Match Skins
example scene to demonstrate how the 3.8 Skin API and combining skins can be used for a wardrobe and equipment use case. -
Spine Timeline Extensions: Added
Hold Previous
parameter atSpineAnimationStateClip
. -
Added more warning messages at incompatible SkeletonRenderer/SkeletonGraphic Component vs Material settings. They appear both as an info box in the Inspector as well as upon initialization in the Console log window. The Inspector box warnings can be disabled via
Edit - Preferences - Spine
. -
Now providing
BeforeApply
update callbacks at all skeleton animation components (SkeletonAnimation
,SkeletonMecanim
andSkeletonGraphic
). -
Added
BoundingBoxFollowerGraphic
component. This class is a counterpart ofBoundingBoxFollower
that can be used withSkeletonGraphic
. -
Added Inspector context menu functions
SkeletonRenderer - Add all BoundingBoxFollower GameObjects
andSkeletonGraphic - Add all BoundingBoxFollowerGraphic GameObjects
that automatically generate bounding box follower GameObjects for everyBoundingBoxAttachment
for all skins of a skeleton. -
GetRemappedClone()
now provides an additional parameterpivotShiftsMeshUVCoords
forMeshAttachment
to prevent uv shifts at a non-central Sprite pivot. This parameter defaults totrue
to maintain previous behaviour. -
SkeletonRenderer
components now provide an additional update modeOnly Event Timelines
at theUpdate When Invisible
property. This mode saves additional timeline updates compared to update modeEverything Except Mesh
. -
Now all URP (Universal Render Pipeline) and LWRP (Lightweight Render Pipeline) shaders support SRP (Scriptable Render Pipeline) batching. See Unity SRPBatcher documentation pages for additional information.
-
Sprite shaders now provide four
Diffuse Ramp
modes as an Inspector Material parameter:Hard
,Soft
,Old Hard
andOld Soft
. In spine-unity 3.8 it defaults toOld Hard
to keep the behaviour of existing projects unchanged. From 4.0 on it defaults toHard
for newly created materials while existing ones remain unchanged. Note thatOld Hard
andOld Soft
ramp versions were using only the right half of the ramp texture, and additionally multiplying the light intensity by 2, both leading to brighter lighting than without a ramp texture active. The new ramp modesHard
andSoft
use the full ramp texture and do not modify light intensity, being consistent with lighting without a ramp texture active. -
Added native support for slot blend modes
Additive
,Multiply
andScreen
with automatic assignment at newly imported skeleton assets.BlendModeMaterialAssets
are now obsolete and replaced by the native properties atSkeletonDataAsset
. TheSkeletonDataAsset
Inspector provides a newBlend Modes - Upgrade
button to upgrade an obsoleteBlendModeMaterialAsset
to the native blend modes properties. This upgrade will be performed automatically on imported and re-imported assets in Unity 2020.1 and newer to prevent reportedBlendModeMaterialAsset
issues in these Unity versions. spine-unity 4.0 and newer will automatically perform this upgrade regardless of the Unity version. -
BoneFollower
andBoneFollowerGraphic
components now provide better support for following bones when the skeleton's Transform is not the parent of the follower's Transform. Previously e.g. rotating a common parent Transform did not lead to the desired result, as well as negatively scaling a skeleton's Transform when it is not a parent of the follower's Transform. -
URP and LWRP
Sprite
andSkeletonLit
shaders no longer requireAdvanced - Add Normals
enabled to properly cast and receive shadows. It is recommended to disableAdd Normals
if normals are otherwise not needed. -
Added an example component
RootMotionDeltaCompensation
located inSpine Examples/Scripts/Sample Components
which can be used for applying simple delta compensation. You can enable and disable the component to toggle delta compensation of the currently playing animation on and off. -
Root motion delta compensation now allows to only adjust X or Y components instead of both. Adds two parameters to
SkeletonRootMotionBase.AdjustRootMotionToDistance()
which default to adjusting both X and Y as before. TheRootMotionDeltaCompensation
example component exposes these parameters as public attributes. -
Root motion delta compensation now allows to also add translation root motion to e.g. adjust a horizontal jump upwards or downwards over time. This is necessary because a Y root motion of zero cannot be scaled to become non-zero.
-
Attachment.GetRemappedClone(Sprite)
method now provides an additional optional parameteruseOriginalRegionScale
. When set totrue
, the replaced attachment's scale is used instead of the Sprite'sPixel per Unity
setting, allowing for more consistent scaling. Note: When remapping Sprites, be sure to set the Sprite'sMesh Type
toFull Rect
and notTight
, otherwise the scale will be wrong.
-
-
Changes of default values
SkeletonMecanim
'sLayer Mix Mode
now defaults toMixMode.MixNext
instead ofMixMode.MixAlways
.BlendModeMaterialAsset
and it's instanceDefault BlendModeMaterials.asset
now haveApply Additive Material
set totrue
by default in order to apply all blend modes by default.
-
Deprecated
- Deprecated
Modules/SlotBlendModes/SlotBlendModes
component. Changed namespace fromSpine.Unity.Modules
toSpine.Unity.Deprecated
. Moved toDeprecated/SlotBlendModes
.
- Deprecated
-
Restructuring (Non-Breaking)
Note: The following changes will most likely not affect users of the Spine-Unity runtime as the API remains unchanged and no references are invalidated.
- Removed duplicates of
.cginc
files inModules/Shaders/Sprite
that were also present in theModules/Shaders/Sprite/CGIncludes
directory. - Moved shaders from
Modules/Shaders
toShaders
directory. - Moved shaders from
Modules/SkeletonGraphic/Shaders
toShaders/SkeletonGraphic
. - Renamed shader
Shaders/Spine-SkeletonLit.shader
toShaders/Spine-Skeleton-Lit.shader
. - Moved components from
SkeletonGraphic
toComponents
andComponents/Following
except forSkeletonGraphicMirror
which was moved toSpine Examples/Scripts/Sample Components
. - Moved
BoneFollower
,BoneFollowerGraphic
andPointFollower
fromComponents
directory toComponents/Following
. - Moved
BoundingBoxFollower
component fromModules/BoundingBoxFollower
toComponents/Following
. - Moved
Modules/SkeletonRenderSeparator
directory toComponents/SkeletonRenderSeparator
. - Moved
Modules/CustomMaterials
directory toComponents/SkeletonRendererCustomMaterials
. - Moved
Asset Types/BlendModeMaterialsAsset.cs
class,Shaders/BlendModes/Default BlendModeMaterials.asset
and materials fromShaders/BlendModes
toSkeletonDataModifierAssets/BlendModeMaterials
directory. - Moved
Modules/Ghost
directory toSpine Examples/Scripts/Sample Components/Ghost
. - Moved
Modules/SkeletonUtility Modules
directory toSpine Examples/Scripts/Sample Components/SkeletonUtility Modules
. - Moved
Modules/AnimationMatchModifier
directory toSpine Examples/Scripts/MecanimAnimationMatchModifier
. - Moved
SkeletonRagdoll
andSkeletonRagdoll2D
components fromModules/Ragdoll
directory toSpine Examples/Scripts/Sample Components/SkeletonUtility Modules
. - Moved
AttachmentTools.cs
toUtility
directory. - Split the file
AttachmentTools
into 5 separate files for each contained class. No namespace or other API changes performed. - Split the file
Mesh Generation/SpineMesh
into 4 separate files for each contained class. No namespace or other API changes performed. - Moved
SkeletonExtensions.cs
toUtility
directory. - Moved
Modules/YieldInstructions
directory toUtility/YieldInstructions
. - Moved corresponding editor scripts of the above components to restructured directories as well.
- Renamed inspector editor class
PointFollowerEditor
toPointFollowerInspector
for consistency reasons.
- Removed duplicates of
- Updated to latest MonoGame version 3.7.1
- Rewrote example project to be cleaner and better demonstrate basic Spine features.
- Added mix-and-match example to demonstrate the new Skin API.
- Added normalmap support via
SpineEffectNormalmap
and support for loading multiple texture layers following a suffix-pattern. Please see the example code on how to use them.
-
Breaking changes
- Renamed
Slot#getAttachmentVertices()
toSlot#getDeform()
. - Changed the
.json
curve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin#addAttachment()
toSkin#setAttachment()
. - Removed
VertexAttachment#applyDeform()
and replaced it withVertexAttachment#deformAttachment
. The attachment set on this field is used to decide if aDeformTimeline
should be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeform
field, getter, and setter fromMeshAttachment
. - Changed
.skel
binary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. JsonRollback
tool now converts from 3.8 JSON to 3.7.- Changed the
.json
and.skel
file formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
- Added
x
andy
coordinates for setup pose AABB inSkeletonData
. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments()
. Returns all attachments in the skin. - Added
Skin#getAttachments(int slotIndex)
. Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachment
are shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment#copy()
to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh()
, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
SkeletonViewer
can load a skeleton by specifying it as the first argument on the command line.- Added mix-and-match example to demonstrate the new Skin API.
-
Breaking changes
- Renamed
Slot:getAttachmentVertices()
toSlot#deform
. - Changed the
.json
curve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin:addAttachment()
toSkin#setAttachment()
. - Removed
VertexAttachment:applyDeform()
and replaced it withVertexAttachment#deformAttachment
. The attachment set on this field is used to decide if aDeformTimeline
should be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeform
field, getter, and setter fromMeshAttachment
. - Changed the
.json
file format to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
- Added
x
andy
coordinates for setup pose AABB inSkeletonData
. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin:getAttachments()
. Returns all attachments in the skin. - Added
Skin:getAttachments(slotIndex)
. Returns all attachements in the skin for the given slot index. - Added
Skin:addSkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin:copySkin(Skin skin)
. Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachment
are shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment:copy()
to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment:newLinkedMesh()
, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
- Added support for 0-1 RGBA color component range change in Löve 0.11+. Older Löve versions using the 0-255 range are still supported!
- Added mix-and-match example to demonstrate the new Skin API.
- Added mix-and-match example to demonstrate the new Skin API.
-
Breaking changes
- Renamed
MixDirection.in/out
toMixDirection.mixIn/mixOut
as it was crashing a JS compressor. - Renamed
Slot#getAttachmentVertices()
toSlot#getDeform()
. - Changed the
.json
curve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin#addAttachment()
toSkin#setAttachment()
. - Removed
VertexAttachment#applyDeform()
and replaced it withVertexAttachment#deformAttachment
. The attachment set on this field is used to decide if aDeformTimeline
should be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeform
field, getter, and setter fromMeshAttachment
. - Changed
.skel
binary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.json
and.skel
file formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes. - Updated runtime to be compatible with TypeScript 3.6.3.
- Renamed
-
Additions
- Added support for loading binary data via
AssetManager#loadBinary()
.AssetManager#get()
will return aUint8Array
for such assets. - Added support for loading binaries via new
SkeletonBinary
. Parses aUint8Array
. - Added
x
andy
coordinates for setup pose AABB inSkeletonData
. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments()
. Returns all attachments in the skin. - Added
Skin#getAttachments(slotIndex: number)
. Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(skin: Skin)
. Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(skin: Skin)
. Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachment
are shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment#copy()
to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh()
, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
AssetManager.setRawDataURI(path, data)
. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file. - Added
AssetManager.loadAll()
to allow Promise/async/await based waiting for completion of asset load. See thespine-canvas
examples. - Added
Skeleton.getBoundRect()
helper method to calculate the bouding rectangle of the current pose, returning the result as{ x, y, width, height }
. Note that this method will create temporary objects which can add to garbage collection pressure.
- Added support for loading binary data via
Input
can now take a partially defined implementation ofInputListener
.- Added mix-and-match example to demonstrate the new Skin API.
SkeletonMesh
now takes an optionalSkeletonMeshMaterialParametersCustomizer
function that allows you to modify theShaderMaterialParameters
before the material is finalized. Use it to modify things like THREEJS'Material.depthTest
etc. See #1590.
SpinePlayer#setAnimation()
can now be called directly to set the animation being displayed.- The player supports loading
.skel
binary skeleton files by setting theSpinePlayerConfig#skelUrl
field instead ofSpinePlayerConfig#jsonUrl
. - Added
SpinePlayerConfig#rawDataURIs
. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file. See the example for a demonstration.
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
MixPose
is now calledMixBlend
- Skeleton
flipX/flipY
has been replaced withscaleX/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale
. See #1194
- Additions
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, setTrackEntry#alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath
,volume
andbalance
fields on event (data). TrackEntry
has an additional field calledholdPrevious
. It can be used to counter act a limitation ofAnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
- Added support for vertex effects. See
RaptorExample.as
- Added 'getTexture()' method to 'StarlingTextureAtlasAttachmentLoader'
- Breaking change: if a skeleton requires two color tinting, you have to enable it via
SkeletonSprite.twoColorTint = true
. In this case the skeleton will use theTwoColorMeshStyle
, which internally uses a different vertex layout and shader. This means that skeletons with two color tinting enabled will break batching and hence increase the number of draw calls in your app. - Added
VertexEffect
and implementationsJitterEffect
andSwirlEffect
. Allows you to modify vertices before they are submitted for drawing. See Starling changes. - Fix issues with StarlingAtlasAttachmentLoader, see #939
- Fix issues with region trimming support, see https://github.com/EsotericSoftware/spine-runtimes/commit/262bc26c64d4111002d80e201cb1a3345e6727df
- Added support for overriding
StarlingAtlasAttachmentLoader#getTexture()
, see https://github.com/EsotericSoftware/spine-runtimes/commit/ea7dbecb98edc74e439aa9ef90dcf6eed865f718 - Texture atlas operations are no longer handled in
Starling#newRegionAttachment
andStarling#newMeshAttachment
but delegated to the atlas. - Added sample for additive animation blending, see https://github.com/EsotericSoftware/spine-runtimes/blob/6a556de01429878df47bb276a97959a8bdbbe32f/spine-starling/spine-starling-example/src/spine/examples/OwlExample.as
- Added sample on how to use bounding box attachment vertices https://github.com/EsotericSoftware/spine-runtimes/commit/e20428b02699226164fa73ba4b12f7d029ae6f4d
- Fully transparent meshes are not submitted for rendering.
- No hit-tests are performed when a skeleton is invisible.
- Breaking changes
- Listeners on
spAnimationState
andspTrackEntry
will now also be called if a track entry gets disposed as part of disposing an animation state. - The completion event will fire for looped 0 duration animations every frame.
- The spine-cocos2dx and spine-ue4 runtimes are now based on spine-cpp. See below for changes.
- Skeleton
flipX/flipY
has been replaced withscaleX/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale
. See #1194 spMeshAttachment
has two new fieldsregionTextureWith
andregionTextureHeight
. These must be set in custom attachment loader. SeeAtlasAttachmentLoader
.
- Listeners on
- Additions
- Added support for local and relative transform constraint calculation, including additional fields in
spTransformConstraintData
. Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
spVertexEffect
and corresponding implementationsspJitterVertexEffect
andspSwirlVertexEffect
. Create/dispose through the correspondingspXXXVertexEffect_create()/dispose()
functions. Set on framework/engine specific renderer. - Functions in
extension.h
are not prefixed with_sp
instead of just_
to avoid interference with other libraries. - Introduced
SP_API
macro. Every spine-c function is prefixed with this macro. By default, it is an empty string. Can be used to markup spine-c functions with e.g. ``__declspec` when compiling to a dll or linking to that dll. - Added
void *userData
tospAnimationState
to be consumed in callbacks. - Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
spTrackEntry->mixBlend = SP_MIXBLEND_ADD)
on each track. To specify the blend percentage, setspTrackEntry->alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Optimized attachment lookup to give a 40x speed-up. See https://github.com/EsotericSoftware/spine-runtimes/commit/cab81276263890b65d07fa2329ace16db1e365ff
- Support for stretchy IK
- Support for audio events, see
audioPath
,volume
andbalance
fields on event (data). spTrackEntry
has an additional field calledholdPrevious
. It can be used to counter act a limitation ofAnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added support for local and relative transform constraint calculation, including additional fields in
- Added vertex effect support to modify vertices of skeletons on the CPU. See
RaptorExample.m
. - Explanation how to handle ARC, see https://github.com/EsotericSoftware/spine-runtimes/commit/a4f122b08c5e2a51d6aad6fc5a947f7ec31f2eb8
- The super class
::update()
method ofSkeletonRenderer
is now called, see https://github.com/EsotericSoftware/spine-runtimes/commit/f7bb98185236a6d8f35bfefc70afe4f31e9ec9d2 - Added improved tint-black shader.
spine-sfml.h
no longer definesSPINE_SHORT_NAMES
to avoid collisions with other APIs. See #1058.- Added support for vertex effects. See raptor example.
- Added premultiplied alpha support to
SkeletonDrawable
. UseSkeletonDrawable::setUsePremultipliedAlpha()
, see https://github.com/EsotericSoftware/spine-runtimes/commit/34086c1f41415309b2ecce86055f6656fcba2950 - Added additive animation blending sample, see
spine-runtimes/spine-sfml/example/main.cpp
Line 369 in b7e712d
- ** Additions **
- Added C++ Spine runtime. See the spine-cpp Runtime Guide for more information on spine-cpp.
- Added parsing of non-essential data (fps, images path, audio path) to for
.json
/.skel
parsers.
- Added ETC1 alpha support, thanks @halx99! Does not work when two color tint is enabled.
- Added
spAtlasPage_setCustomTextureLoader()
which let's you do texture loading manually. Thanks @jareguo. - Added
SkeletonRenderer:setSlotsRange()
andSkeletonRenderer::createWithSkeleton()
. This allows you to split rendering of a skeleton up into multiple parts, and render other nodes in between. SeeSkeletonRendererSeparatorExample.cpp
for an example. - Fully transparent attachments will not be rendered, improving rendering performance.
- Added improved tint-black shader.
- Updated to cocos2d-x 3.16
- The skeleton setup pose and world transform are now calculated on initialization to avoid flickering on start-up.
- Updated to cocos2d-x 3.17.1
- Breaking change: Switched from spine-c to spine-cpp as the underlying Spine runtime. See the spine-cpp Runtime Guide for more information on spine-cpp.
- Added
Cocos2dAttachmentLoader
to be used when constructing anAtlas
. Used by default bySkeletonAnimation
andSkeletonRenderer
when creating instances via thecreateXXX
methods. - All C structs and enums
spXXX
have been replaced with their C++ equivalentsspine::XXX
in all public interfaces. - All instantiations via
new
of C++ classes from spine-cpp should contain(__FILE__, __LINE__)
. This allows the tracking of instantations and detection of memory leaks via thespine::DebugExtension
.
- Added
- Create a second SFML backend using spine-cpp. See the spine-cpp Runtime Guide for more information on spine-cpp.
- Added support for vertex effects. See raptor example.
- Added premultiplied alpha support to
SkeletonDrawable
. UseSkeletonDrawable::setUsePremultipliedAlpha()
, see https://github.com/EsotericSoftware/spine-runtimes/commit/34086c1f41415309b2ecce86055f6656fcba2950 - Added additive animation blending sample, see
spine-runtimes/spine-sfml/example/main.cpp
Line 369 in b7e712d
- spine-c is now exposed from the plugin shared library on Windows via __declspec.
- Updated to Unreal Engine 4.18
- Added C++ example, see https://github.com/EsotericSoftware/spine-runtimes/commit/15011e81b7061495dba45e28b4d3f4efb10d7f40
SkeletonRendererComponent
generates collision meshes by default.- Disabled generation of collision meshes by
SkeletonRendererComponent
. BothProceduralMeshComponent
andRuntimeMeshComponent
have a bug that generates a new PhysiX file every frame per component. Users are advised to add a separate collision shape to the root scene component of an actor instead. - Using UE4
FMemory
allocator by default. This should fix issues on some consoles. - Breaking change moved away from
RuntimeMeshComponent
, as its maintainance has seized, back toProceduralMeshComponent
. Existing projects should just work. However, if you run into issues, you may have to remove the oldSpineSkeletonRendererComponent
and add a new one to your existing actors. - Breaking change due to the removal of
RuntimeMeshComponent
and reversal toProceduralMeshComponent
, two color tinting is currently not supported.ProceduralMeshComponent
does not support enough vertex attributes for us to encode the second color in the vertex stream. You can remove theRuntimeMeshComponent/
directory from your plugins directory and remove the component from anybuild.cs
files that may reference it. - Breaking change: Switched from spine-c to spine-cpp as the underlying Spine runtime. See the spine-cpp Runtime Guide for more information on spine-cpp.
- All C structs and enums
spXXX
have been replaced with their C++ equivalentsspine::XXX
in all public interfaces. - All instantiations via
new
of C++ classes from spine-cpp should contain(__FILE__, __LINE__)
. This allows the tracking of instantations and detection of memory leaks via thespine::DebugExtension
. - Updated to Unreal Engine 4.20 (samples require 4.17+), see the
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/SpinePlugin.build.cs
file on how to compile in 4.20 with the latest UBT API changes. - Updated to Unreal Engine 4.21 (samples require 4.21).
- Breaking change:
UBoneDriverComponent
andUBoneFollowerComponent
are nowUSceneComponent
instead ofUActorComponent
. They either update only themselves, or also the owningUActor
, depending on whether the new flagUseComponentTransform
is set. See #1175 - Added query methods for slots, bones, skins and animations to
SpineSkeletonComponent
andUTrackEntry
. These allow you to query these objects by name in both C++ and blueprints. - Added
Preview Animation
andPreview Skin
properties toSpineSkeletonAnimationComponent
. Enter an animation or skin name to live-preview it in the editor. Enter an empty string to reset the animation or skin.
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
- Skeleton
flipX/flipY
has been replaced withscaleX/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale
. See #1194
- Additions
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#MixBlend = MixBlend.add
on each track. To specify the blend percentage, setTrackEntry#Alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath
,volume
andbalance
fields on event (data). TrackEntry
has an additional field calledholdPrevious
. It can be used to counter act a limitation ofAnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
- Runtime and Editor, and Assembly Definition Files and folders have been reorganized into "Runtime" and "Editor". Each of these have an
.asmdef
file that defines these separately as their own assembly in Unity (Note: Spine.asmdef
files are currently deactivated to.txt
extension, see below). For projects not using assembly definition, you may delete the.asmdef
files. These assembly definitions will be ignored by older versions of Unity that don't support it.- In this scheme, the entirety of the base spine-csharp runtime is inside the "Runtime" folder, to be compiled in the same assembly as spine-unity so they can continue to share internal members.
- Spine
.asmdef
files are now deactivated (using.txt
extension) by default This prevents problems when updating Spine through unitypackages, overwriting the Timeline reference entry inspine-unity.asmdef
(added automatically when enabling Unity 2019 Timeline support, seeTimeline Support for Unity 2019
), causing compile errors. In case you want to enable the.asmdef
files, rename the files:Spine/Runtime/spine-unity.txt
toSpine/Runtime/spine-unity.asmdef
andSpine/Editor/spine-unity-editor.txt
toSpine/Editor/spine-unity-editor.asmdef
. - SkeletonAnimator is now SkeletonMecanim The Spine-Unity Mecanim-driven component
SkeletonAnimator
has been renamedSkeletonMecanim
to make it more autocomplete-friendly and more obvious at human-glance. The .meta files and guids should remain intact so existing projects and prefabs should not break. However, user code needs to be updated to useSkeletonMecanim
. - SpineAtlasAsset The existing
AtlasAsset
type has been renamed toSpineAtlasAsset
to signify that it specifically uses a Spine/libGDX atlas as its source. Serialization should be intact but user code will need to be updated to refer to existing atlases asSpineAtlasAsset
.- AtlasAssetBase
SpineAtlasAsset
now has an abstract base class calledSpineAtlasAsset
. This is the base class to derive when using alternate atlas sources. Existing SkeletonDataAsset field "atlasAssets" now have the "AtlasAssetBase" type. Serialization should be intact, but user code will need to be updated to refer to the atlas assets accordingly. - This change is in preparation for alternate atlas options such as Unity's SpriteAtlas.
- AtlasAssetBase
- Optional Straight Alpha for shaders Spine-Unity's included Unity shaders now have a
_STRAIGHT_ALPHA_INPUT
shader_feature, toggled as a checkbox in the Material's inspector. This allows the Material to use a non-premultiplied alpha/straight alpha input texture.- The following shaders now have the "Straight Alpha Texture" checkbox when used on a material:
Spine/Skeleton
Spine/Skeleton Tint Black
Spine/Skeleton Lit
Spine/Skeleton Tint
Spine/Skeleton Fill
Spine/SkeletonGraphic (Premultiply Alpha)
was renamed toSpine/SkeletonGraphic
Spine/SkeletonGraphic Tint Black (Premultiply Alpha)
was renamed toSpine/SkeletonGraphic Tint Black
Spine/Skeleton PMA Multiply
Spine/Skeleton PMA Screen
- Dedicated straight alpha shaders were removed from the runtime.
Spine/Straight Alpha/Skeleton Fill
Spine/Straight Alpha/Skeleton Tint
- The following shaders now have the "Straight Alpha Texture" checkbox when used on a material:
- Detection of Incorrect Texture Settings Especially when atlas textures are exported with setting
Premultiply alpha
enabled, it is important to configure Unity's texture import settings correctly. By default, you will now receive warnings where texture settings are expected to cause incorrect rendering.- The following rules apply:
sRGB (Color Texture)
shall be disabled whenGenerate Mip Maps
is enabled, otherwise you will receive white border outlines.Alpha Is Transparency
shall be disabled onPremultiply alpha
textures, otherwise you will receive light ghosting artifacts in transparent areas.
- These warnings can be disabled in
Edit - Preferences - Spine
.
- The following rules apply:
- Sprite Mask Support for all Included Shaders The
Skeleton Animation
andSkeleton Mecanim
components now provide an additionalMask Interaction
field in the Inspector, covering identical functionality as Unity's built inSprite Renderer
component:Mask Interaction
modes:None
- The sprite will not interact with the masking system. Default behavior.Visible Inside Mask
- The sprite will be visible only in areas where a mask is present.Visible Outside Mask
- The sprite will be visible only in areas where no mask is present.
Automatically Generated Materials
When switchingMask Interaction
modes in the Inspector outside of Play mode, the required additional material assets are generated for the respectiveStencil Compare
parameters - with file suffixes'_InsideMask'
and'_OutsideMask'
, placed in the same folder as the original materials. By default all generated materials are kept as references by theSkeleton Animation
component for switching at runtime. These materials can be managed and optimized via theSkeletonAnimation
'sAdvanced
section:- Using the
Clear
button you can clear the reference to unneeded materials, - Using the
Delete
button the respective assets are deleted as well as references cleared. Note that otherSkeleton Animation
GameObjects might still reference the materials, so use with caution! - With the
Set
button you can again assign a link to the respective materials to prepare them for runtime use. If the materials were not present or have been deleted, they are generated again based on the default materials.
- Using the
- When switching
Mask Interaction
mode at runtime, the previously prepared materials are switched active automatically. When the respective materials have not been prepared, material copies of the default materials are created on the fly. Note that these materials are not shared between similarSkeleton Animation
GameObjects, so it is recommended to use the generated material assets where possible. - Every shader now exposes the
Stencil Compare
parameter for further customization. This way you have maximum flexibility to use custom mechanisms to switch materials at runtime if you should ever need more than the three materials generated bySkeleton Animation
'sMask Interaction
parameter. ReferenceStencil Compare
values are:CompareFunction.Disabled
forMask Interaction - None
CompareFunction.LessEqual
forMask Interaction - Visible Inside Mask
CompareFunction.Greater
forMask Interaction - Visible Outside Mask
- RectMask2D Support for SkeletonGraphic Both
SkeletonGraphic
shaders 'Spine/SkeletonGraphic
' and 'Spine/SkeletonGraphic Tint Black
' now respect masking areas defined via Unity'sRectMask2D
component. - Timeline Support for Unity 2019 using the existing Timeline components. By default, all Spine Timeline components are deactivated in Unity 2019 and can be activated via the Spine Preferences menu. This step became necessary because in Unity 2019, Timeline has been moved to a separate Package and is no longer included in the Unity core. Please visit
Edit - Preferences - Spine
and atTimeline Package Support
hitEnable
to automatically perform all necessary steps to activate the Timeline components. This will automatically:- download the Unity Timeline package
- activate the Spine Timeline components by setting the compile definition
SPINE_TIMELINE_PACKAGE_DOWNLOADED
for all platforms - modify the
spine-unity.asmdef
file by adding the reference to the Unity Timeline library.
- Added
Create 2D Hinge Chain
functionality atSkeletonUtilityBone
inspector, previously onlyCreate 3D Hinge Chain
was available.
- Added support for any
Effect
to be used bySkeletonRenderer
- Added support for
IVertexEffect
to modify vertices of skeletons on the CPU.IVertexEffect
instances can be set on theSkeletonRenderer
. See example project. - Added
SkeletonDebugRenderer
- Made
MeshBatcher
of SkeletonRenderer accessible via a getter. Allows user to batch their own geometry together with skeleton meshes for maximum batching instead of using XNA SpriteBatcher.
- Breaking changes
- Skeleton attachments: Moved update of attached skeleton out of libGDX
SkeletonRenderer
, added overloaded methodSkeleton#updateWorldTransform(Bone)
, used forSkeletonAttachment
. You now MUST call this new method with the bone of the parent skeleton to which the child skeleton is attached. SeeSkeletonAttachmentTest
for and example. - The completion event will fire for looped 0 duration animations every frame.
MixPose
is now calledMixBlend
.- Skeleton
flipX/flipY
has been replaced withscaleX/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale
. See #1194
- Skeleton attachments: Moved update of attached skeleton out of libGDX
- Additions
- Added
EventData#audioPath
field. This field contains the file name of the audio file used for the event. - Added convenience method to add all attachments from one skin to another, see https://github.com/EsotericSoftware/spine-runtimes/commit/a0b7bb6c445efdfac12b0cdee2057afa3eff3ead
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, setTrackEntry#alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath
,volume
andbalance
fields on event (data). TrackEntry
has an additional field calledholdPrevious
. It can be used to counter act a limitation ofAnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added
- Added
VertexEffect
interface, instances of which can be set onSkeletonRenderer
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
andVertexEffectTest
. - Added improved tint-black shader.
- Improved performance by avoiding batch flush when not switching between normal and additive rendering with PMA
- Improvements to skeleton viewer.
TwoColorPolygonBatch
implements theBatch
interface, allowing to the be used with other libGDX classes that require a batcher for drawing, potentially improving performance. See https://github.com/EsotericSoftware/spine-runtimes/commit/a46b3d1d0c135d51f9bef9ca17a5f8e5dda69927- Added
SkeletonDrawable
to render skeletons in scene2d UI https://github.com/EsotericSoftware/spine-runtimes/commit/b93686c185e2c9d5466969a8e07eee573ebe4b97
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
- Skeleton
flipX/flipY
has been replaced withscaleX/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale
. See #1194
- Additions
- Added
JitterEffect
andSwirlEffect
and support for vertex effects in Corona and Love - Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry:setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, setTrackEntry.alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath
,volume
andbalance
fields on event (data). TrackEntry
has an additional field calledholdPrevious
. It can be used to counter act a limitation ofAnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added
- Added support for vertex effects. Set an implementation like "JitterEffect" on
Skeleton.vertexEffect
. Seemain.lua
for an example.
- Added support for vertex effects. Set an implementation like "JitterEffect" on
SkeletonRenderer.vertexEffect
. Seemain.lua
for an example
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
- Skeleton
flipX/flipY
has been replaced withscaleX/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale
. See #1194
- Additions
- Added
AssetManager.loadTextureAtlas
. Instead of loading the.atlas
and corresponding image files manually, you can simply specify the location of the.atlas
file and AssetManager will load the atlas and all its images automatically.AssetManager.get("atlasname.atlas")
will then return an instance ofspine.TextureAtlas
. - Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, setTrackEntry#alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. See https://github.com/EsotericSoftware/spine-runtimes/blob/f045d221836fa56191ccda73dd42ae884d4731b8/spine-ts/webgl/tests/test-additive-animation-blending.html for an example. - Added work-around for iOS WebKit JIT bug, see https://github.com/EsotericSoftware/spine-runtimes/commit/c28bbebf804980f55cdd773fed9ff145e0e7e76c
- Support for stretchy IK
- Support for audio events, see
audioPath
,volume
andbalance
fields on event (data). TrackEntry
has an additional field calledholdPrevious
. It can be used to counter act a limitation ofAnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.- Added
AssetManager#setRawDataURI(path, data)
. Allows to set raw data URIs for a specific path, which in turn enables embedding assets into JavaScript/HTML. PolygonBatcher
will now disableCULL_FACE
and restore the state as it was before rendering.
- Added
- Added
VertexEffect
interface, instances of which can be set onSkeletonRenderer
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
, and the example which allows to set effects. - Added
slotRangeStart
andslotRangeEnd
parameters toSkeletonRenderer#draw
andSceneRenderer#drawSkeleton
. This allows you to render only a range of slots in the draw order. Seespine-ts/webgl/tests/test-slot-range.html
for an example. - Added improved tint-black shader.
- Added
SceneRenderer#drawTextureUV()
, allowing to draw a texture with manually specified texture coordinates. - Exposed all renderers in
SceneRenderer
.
- Added support for shearing and non-uniform scaling inherited from parent bones.
- Added support for alpha tinting.
- Added
VertexEffect
interface, instances of which can be set onSkeletonMesh
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
. - Added support for multi-page atlases
- Added fields
atlasContent
,atlasPagesContent
, andjsonContent
toWidgetConfiguration
allowing you to directly pass the contents of the.atlas
, atlas page.png
files, and the.json
file without having to do a request. SeeREADME.md
and the example for details. SpineWidget.setAnimation()
now takes an additional optional parameter for callbacks when animations are completed/interrupted/etc.
-
Breaking changes
- Removed
Bone.worldToLocalRotationX
andBone.worldToLocalRotationY
. Replaced byBone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Made
Bone
fields_a
,_b
,_c
,_d
,_worldX
and_worldY
public, removed underscore prefix. - Removed
VertexAttachment.computeWorldVertices
overload, changedVertexAttachment.computeWorldVertices2
toVertexAttachment.computeWorldVertices
, addedstride
parameter. - Removed
RegionAttachment.vertices
field. The vertices array is provided toRegionAttachment.computeWorldVertices
by the API user now. - Removed
RegionAttachment.updateWorldVertices
, addedRegionAttachment.computeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVertices
array, starting atoffset
, then moving bystride
array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - Replaced
r
,g
,b
,a
fields with instances of newColor
class inRegionAttachment
,MeshAttachment
,Skeleton
,SkeletonData
,Slot
andSlotData
. - The completion event will fire for looped 0 duration animations every frame.
- Removed
-
Additions
- Added
Skeleton.getBounds
from reference implementation. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
- Added
Bone.localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimeline
and additional fields onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
VertexEffect
and implementationsJitterEffect
andSwirlEffect
. Allows you to modify vertices before they are submitted for drawing. See Starling changes.
- Added
- Fixed renderer to work with 3.6 changes.
- Added support for two color tinting.
- Added support for clipping.
- Added support for rotated regions in texture atlas loaded via StarlingAtlasAttachmentLoader.
- Added support for vertex effects. See
RaptorExample.as
- Added 'getTexture()' method to 'StarlingTextureAtlasAttachmentLoader'
- Breaking change: if a skeleton requires two color tinting, you have to enable it via
SkeletonSprite.twoColorTint = true
. In this case the skeleton will use theTwoColorMeshStyle
, which internally uses a different vertex layout and shader. This means that skeletons with two color tinting enabled will break batching and hence increase the number of draw calls in your app.
- Breaking changes
spVertexAttachment_computeWorldVertices
andspRegionAttachment_computeWorldVerticeS
now take new parameters to make it possible to directly output the calculated vertex positions to a vertex buffer. Removes the need for additional copies in the backends' respective renderers.- Removed
spBoundingBoxAttachment_computeWorldVertices
, superseded byspVertexAttachment_computeWorldVertices
. - Removed
spPathAttachment_computeWorldVertices
andspPathAttachment_computeWorldVertices1
, superseded byspVertexAttachment_computeWorldVertices
. - Removed
sp_MeshAttachment_computeWorldVertices
, superseded byspVertexAttachment_computeWorldVertices
. - Removed
spBone_worldToLocalRotationX
andspBone_worldToLocalRotationY
. Replaced byspBone_worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Replaced
r
,g
,b
,a
fields with instances of newspColor
struct inspRegionAttachment
,spMeshAttachment
,spSkeleton
,spSkeletonData
,spSlot
andspSlotData
. - Removed
spVertexIndex
from public API. - Listeners on
spAnimationState
orspTrackEntry
will now be also called in case a track entry is disposed as part of dispoing thespAnimationState
. - The completion event will fire for looped 0 duration animations every frame.
- Additions
- Added support for local and relative transform constraint calculation, including additional fields in
spTransformConstraintData
. - Added
spPointAttachment
, additional methodspAtlasAttachmentLoadeR_newPointAttachment
. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
- Added
spBone_localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
spTwoColorTimeline
and additional fields onspSlot
andspSlotData
. - Added
userData
field tospTrackEntry
, so users can expose data inspAnimationState
callbacks. - Modified kvec.h used by SkeletonBinary.c to use Spine's MALLOC/FREE macros. That way there's only one place to inject custom allocators (extension.h) commit
- Added macros to define typed dynamic arrays, see
Array.h/.c
- Added
spClippingAttachment
and respective enum. - Added
spSkeletonClipper
andspTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
spVertexEffect
and corresponding implementationsspJitterVertexEffect
andspSwirlVertexEffect
. Create/dispose through the correspondingspXXXVertexEffect_create()/dispose()
functions. Set on framework/engine specific renderer. See changes for spine-c based frameworks/engines below. - Functions in
extension.h
are not prefixed with_sp
instead of just_
to avoid interference with other libraries. - Introduced
SP_API
macro. Every spine-c function is prefixed with this macro. By default, it is an empty string. Can be used to markup spine-c functions with e.g. ``__declspec` when compiling to a dll or linking to that dll.
- Added support for local and relative transform constraint calculation, including additional fields in
- Fixed renderer to work with 3.6 changes
- Optimized rendering by removing all per-frame allocation in
SkeletonRenderer
, resulting in 15% performance increase for large numbers of skeletons being rendered per frame. - Added support for two color tinting. Tinting is enabled/disabled per
SkeletonRenderer
/SkeletonAnimation
instance. UseSkeletonRenderer::setTwoColorTint()
. Note that two color tinting requires the use of a non-standard shader and vertex format. This means that skeletons rendered with two color tinting will break batching. However, skeletons with two color tinting enabled and rendered after each other will be batched. - Updated example to use Cocos2d-x 3.14.1.
- Added mesh debug rendering. Enable/Disable via
SkeletonRenderer::setDebugMeshesEnabled()
. - Added support for clipping.
- SkeletonRenderer now combines the displayed color of the Node (cascaded from all parents) with the skeleton color for tinting.
- Added support for vertex effects. See
RaptorExample.cpp
. - Added ETC1 alpha support, thanks @halx99! Does not work when two color tint is enabled.
- Added
spAtlasPage_setCustomTextureLoader()
which let's you do texture loading manually. Thanks @jareguo. - Added
SkeletonRenderer:setSlotsRange()
andSkeletonRenderer::createWithSkeleton()
. This allows you to split rendering of a skeleton up into multiple parts, and render other nodes in between. SeeSkeletonRendererSeparatorExample.cpp
for an example.
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Tinting is enabled/disabled per
SkeletonRenderer/SkeletonAnimation.twoColorTint = true
. Note that two color tinted skeletons do not batch with other nodes. - Added support for clipping.
- Fixed renderer to work with 3.6 changes. Sadly, two color tinting does not work, as the vertex format in SFML is fixed.
- Added support for clipping.
- Added support for vertex effects. See raptor example.
- Added premultiplied alpha support to
SkeletonDrawable
.
- Fixed renderer to work with 3.6 changes
- Added new UPROPERTY to SpineSkeletonRendererComponent called
Color
. This allows to set the tint color of the skeleton in the editor, C++ and Blueprints. Under the hood, thespSkeleton->color
will be set on every tick of the renderer component. - Added support for clipping.
- Switched from built-in ProceduralMeshComponent to RuntimeMeshComponent by Koderz (https://github.com/Koderz/UE4RuntimeMeshComponent, MIT). Needed for more flexibility regarding vertex format, should not have an impact on existing code/assets. You need to copy the RuntimeMeshComponentPlugin from our repository in
spine-ue4\Plugins\
to your project as well! - Added support for two color tinting. All base materials, e.g. SpineUnlitNormalMaterial, now do proper two color tinting. No material parameters have changed.
- Updated to Unreal Engine 4.16.1. Note that 4.16 has a regression which will make it impossible to compile plain .c files!
- spine-c is now exposed from the plugin shared library on Windows via __declspec.
-
Breaking changes
MeshAttachment.parentMesh
is now a private field to enforce using the.ParentMesh
setter property in external code. TheMeshAttachment.ParentMesh
property is an appropriate replacement wherever.parentMesh
was used.Skeleton.GetBounds
takes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.- Removed
Bone.WorldToLocalRotationX
andBone.WorldToLocalRotationY
. Replaced byBone.WorldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added
stride
parameter toVertexAttachment.ComputeWorldVertices
. - Removed
RegionAttachment.Vertices
field. The vertices array is provided toRegionAttachment.ComputeWorldVertices
by the API user now. - Removed
RegionAttachment.UpdateWorldVertices
, addedRegionAttachment.ComputeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVertices
array, starting atoffset
, then moving bystride
array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - The completion event will fire for looped 0 duration animations every frame.
-
Additions
-
Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
-
Added
Bone.localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). -
Added two color tinting support, including
TwoColorTimeline
and additional fields onSlot
andSlotData
. -
Added
PointAttachment
, additional methodNewPointAttachment
inAttachmentLoader
interface. -
Added
ClippingAttachment
, additional methodNewClippingAttachment
inAttachmentLoader
interface. -
Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. -
AnimationState.Apply
returns a bool indicating if any timeline was applied or not. -
Animation.Apply
andTimeline.Apply`` now take enums
MixPoseand
MixDirection` instead of bools.
- Refactored renderer to work with new 3.6 features.
- Two color tinting is currently supported via extra UV2 and UV3 mesh vertex streams. To use Two color tinting, you need to:
- switch on "Tint Black" under "Advanced...",
- use the new
Spine/Skeleton Tint Black
shader, or your own shader that treats the UV2 and UV3 streams similarly. - Additionally, for SkeletonGraphic, you can use
Spine/SkeletonGraphic Tint Black
(or the bundled SkeletonGraphicTintBlack material) or your own shader that uses UV2 and UV3 streams similarly. Additional Shader Channels TexCoord1 and TexCoord2 will need to be enabled from the Canvas component's inspector. These correspond to UV2 and UV3.
- Clipping is now supported. Caution: The SkeletonAnimation switches to slightly slower mesh generation code when clipping so limit your use of
ClippingAttachment
s when using on large numbers of skeletons.
- Two color tinting is currently supported via extra UV2 and UV3 mesh vertex streams. To use Two color tinting, you need to:
- SkeletonRenderer.initialFlip Spine components such as SkeletonRenderer, SkeletonAnimation, SkeletonAnimator now has
initialFlipX
andinitialFlipY
fields which are also visible in the inspector under "Advanced...". It will allow you to set and preview a starting flip value for your skeleton component. This is applied immediately when the internal skeleton object is instantiated. - [SpineAttribute] Improvements
- Icons have been added to SpineAttributeDrawers. This should make your default inspectors easier to understand at a glance.
- Added Constraint Attributes You can now use
[SpineIkConstraint]
[SpineTransformConstraint]
[SpinePathConstraint]
- SpineAttribute dataField parameter can also now detect sibling fields within arrays and serializable structs/classes.
- [SpineAttribute(includeNone:false)] SpineAttributes now have an
includeNone
optional parameter to specify if you want to include or exclude a none ("") value option in the dropdown menu. Default isincludeNone:true
. - [SpineAttachment(skinField:"mySkin")] The SpineAttachment attribute now has a skinField optional parameter to limit the dropdown items to attachments in a specific skin instead of the just default skin or all the skins in SkeletonData.
- SkeletonDebugWindow. Debugging tools have been moved from the SkeletonAnimation and SkeletonUtility component inspectors into its own utility window. You can access "Skeleton Debug" under the
Advanced...
foldout in the SkeletonAnimation inspector, or in SkeletonAnimation's right-click/context menu.- Skeleton Baking Window The old Skeleton Baking feature is also now accessible through the SkeletonDataAsset's right-click/context menu.
- AttachmentTools source material.
AttachmentTools
methods can now accept asourceMaterial
argument to copy material properties from. - AttachmentTools Skin Extensions. Using AttachmentTools, you can now add entries by slot name by also providing a skeleton argument. Also
Append(Skin)
,RemoveAttachment
andClear
have been added. - BoneFollower and SkeletonUtilityBone Add RigidBody Button. The BoneFollower and SkeletonUtilityBone component inspectors will now offer to add a
Rigidbody
orRigidbody2D
if it detects a collider of the appropriate type. Having a rigidbody on a moving transform with a collider fits better with the Unity physics systems and prevents excess calculations. It will not detect colliders on child objects so you have to add Rigidbody components manually accordingly. - SkeletonRenderer.OnPostProcessVertices is a new callback that gives you a reference to the MeshGenerator after it has generated a mesh from the current skeleton pose. You can access
meshGenerator.VertexBuffer
ormeshGenerator.ColorBuffer
to modify these before they get pushed into the UnityEngine.Mesh for rendering. This can be useful for non-shader vertex effects. - Examples
- Examples now use properties. The code in the example scripts have been switched over to using properties instead of fields to encourage their use for consistency. This is in anticipation of both users who want to move the Spine folders to the Unity Plugins folder (compiled as a different assembly), and of Unity 2017's ability to manually define different assemblies for shorter compilation times.
- Mix And Match. The mix-and-match example scene, code and data have been updated to reflect the current recommended setup for animation-compatible custom equip systems The underlying API has changed since 3.5 and the new API calls in MixAndMatch.cs is recommended. Documentation is in progress.
- Sample Components.
AtasRegionAttacher
andSpriteAttacher
are now part ofSample Components
, to reflect that they are meant to be used as sample code rather than production. A few other sample components have also been added. New imports of the unitypackage Examples folder will see a "Legacy" folder comprised of old sample components that no longer contain the most up-to-date and recommended workflows, but are kept in case old setups used them for production.
- Spine folder. In the unitypackage, the "spine-csharp" and "spine-unity" folders are now inside a "Spine" folder. This change will only affect fresh imports. Importing the unitypackage to update Spine-Unity in your existing project will update the appropriate files however you chose to arrange them, as long as the meta files are intact.
- Breaking changes
- The Sprite shaders module was updated to the latest version from the source. Some changes were made to the underlying keyword structure. You may need to review the settings of your lit materials. Particularly, your Fixed Normals settings.
- The
Spine/Skeleton Lit
shader was switched over to non-fixed-function code. It now no longer requires mesh normals and has fixed normals at the shader level. - The old MeshGenerator classes, interfaces and code in
Spine.Unity.MeshGeneration
are now deprecated. All mesh-generating components now share the classSpine.Unity.MeshGenerator
defined inSpineMesh.cs
. MeshGenerator is a serializable class.- The
SkeletonRenderer.renderMeshes
optimization is currently non-functional. - Old triangle-winding code has been removed from
SkeletonRenderer
. Please use shaders that have backface culling off. - Render settings in
SkeletonGraphic
can now be accessed underSkeletonGraphic.MeshGenerator.settings
. This is visible in the SkeletonGraphic inspector asAdvanced...
- We will continue to bundle the unitypackage with the empty .cs files of deprecated classes until Spine 3.7 to ensure the upgrade process does not break.
- The
- The [SpineAttachment(slotField:)] optional parameter found property value now acts as a Find(slotName) argument rather than Contains(slotName).
SkeletonAnimator
now uses aSkeletonAnimator.MecanimTranslator
class to translate an Animator's Mecanim State Machine into skeleton poses. This makes code reuse possible for a Mecanim version of SkeletonGraphic.SkeletonAnimator
autoreset
and themixModes
array are now a part of SkeletonAnimator's MecanimTranslator.Translator
.autoReset
is set totrue
by default. Old prefabs and scene objects with Skeleton Animator may no longer have correct values set.- Warnings and conditionals checking for specific Unity 5.2-and-below incompatibility have been removed.
- Added support for clipping
- Removed
RegionBatcher
andSkeletonRegionRenderer
, renamedSkeletonMeshRenderer
toSkeletonRenderer
- Added support for two color tint. For it to work, you need to add the
SpineEffect.fx
file to your content project, then load it viavar effect = Content.Load<Effect>("SpineEffect");
, and set it on theSkeletonRenderer
. See the example project for code. - Added support for any
Effect
to be used bySkeletonRenderer
- Added support for
IVertexEffect
to modify vertices of skeletons on the CPU.IVertexEffect
instances can be set on theSkeletonRenderer
. See example project. - Added
SkeletonDebugRenderer
- Made
MeshBatcher
of SkeletonRenderer accessible via a getter. Allows user to batch their own geometry together with skeleton meshes for maximum batching instead of using XNA SpriteBatcher.
-
Breaking changes
Skeleton.getBounds
takes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.- Removed
Bone.worldToLocalRotationX
andBone.worldToLocalRotationY
. Replaced byBone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added
stride
parameter toVertexAttachment.computeWorldVertices
. - Removed
RegionAttachment.vertices
field. The vertices array is provided toRegionAttachment.computeWorldVertices
by the API user now. - Removed
RegionAttachment.updateWorldVertices
, addedRegionAttachment.computeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVertices
array, starting atoffset
, then moving bystride
array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - Skeleton attachments: Moved update of attached skeleton out of libGDX
SkeletonRenderer
, added overloaded methodSkeleton#updateWorldTransform(Bone), used for
SkeletonAttachment. You now MUST call this new method with the bone of the parent skeleton to which the child skeleton is attached. See
SkeletonAttachmentTest` for and example. - The completion event will fire for looped 0 duration animations every frame.
-
Additions
- Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
- Added
Bone.localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimeline
and additional fields onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. - Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans
- Added support for local and relative transform constraint calculation, including additional fields in
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Use the new
TwoColorPolygonBatch
together withSkeletonRenderer
- Added support for clipping. See
SkeletonClipper
. Used automatically bySkeletonRenderer
. Does not work when using aSpriteBatch
withSkeletonRenderer
. UsePolygonSpriteBatch
orTwoColorPolygonBatch
instead. - Added
VertexEffect
interface, instances of which can be set onSkeletonRenderer
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
andVertexEffectTest
.
- Breaking changes
- Removed
Bone:worldToLocalRotationX
andBone:worldToLocalRotationY
. Replaced byBone:worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). VertexAttachment:computeWorldVertices
now takes offsets and stride to allow compositing vertices directly in a vertex buffer to be send to the GPU. The compositing is now performed in the backends' respective renderers. This also affects the subclassesMeshAttachment
,BoundingBoxAttachment
andPathAttachment
.- Removed
RegionAttachment:updateWorldVertices
, addedRegionAttachment:computeWorldVertices
, which takes offsets and stride to allow compositing vertices directly in a vertex buffer to be send to the GPU. The compositing is now performed in the backends' respective renderers. - Removed
MeshAttachment.worldVertices
field. Computation is now performed in each backends' respective renderer. Theuv
coordinates are now stored inMeshAttachment.uvs
. - Removed
RegionAttachment.vertices
field. Computation is now performed in each backends respective renderer. Theuv
coordinates for each vertex are now stored in theRegionAttachment.uvs
field. - The completion event will fire for looped 0 duration animations every frame.
- Removed
- Additions
- Added
Bone:localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimeline
and additional fields onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
- Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. - Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
JitterEffect
andSwirlEffect
and support for vertex effects in Corona and Love
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Enable it via
SkeletonRenderer.new(true)
. - Added clipping support.
- Added support for vertex effects. Set an implementation like "JitterEffect" on
Skeleton.vertexEffect
. Seemain.lua
for an example.
- Fixed renderer to work with 3.6 changes. Sadly, two color tinting is not supported, as Corona doesn't let us change the vertex format needed and its doesn't allow to modify shaders in the way needed for two color tinting
- Added clipping support.
- Added support for vertex effects. Set an implementation like "JitterEffect" on
SkeletonRenderer.vertexEffect
. Seemain.lua
for an example
-
Breaking changes
Skeleton.getBounds
takes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.- Removed
Bone.worldToLocalRotationX
andBone.worldToLocalRotationY
. Replaced byBone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Removed
VertexAttachment.computeWorldVertices
overload, changedVertexAttachment.computeWorldVerticesWith
toVertexAttachment.computeWorldVertices
, addedstride
parameter. - Removed
RegionAttachment.vertices
field. The vertices array is provided toRegionAttachment.computeWorldVertices
by the API user now. - Removed
RegionAttachment.updateWorldVertices
, addedRegionAttachment.computeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVertices
array, starting atoffset
, then moving bystride
array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - The completion event will fire for looped 0 duration animations every frame.
- Removed the Spine Widget in favor of Spine Web Player.
-
Additions
- Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
- Added
Bone.localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimeline
and additional fields onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. - Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
AssetManager.loadTextureAtlas
. Instead of loading the.atlas
and corresponding image files manually, you can simply specify the location of the.atlas
file and AssetManager will load the atlas and all its images automatically.AssetManager.get("atlasname.atlas")
will then return an instance ofspine.TextureAtlas
. - Added the Spine Web Player
- Added support for local and relative transform constraint calculation, including additional fields in
- Fixed WebGL context loss
- Added
Restorable
interface, implemented by any WebGL resource that needs restoration after a context loss. All WebGL resource classes (Shader
,Mesh
,GLTexture
) implement this interface. - Added
ManagedWebGLRenderingContext
. Handles setup of aWebGLRenderingContext
given a canvas element and restoration of WebGL resources (Shader
,Mesh
,GLTexture
) on WebGL context loss. WebGL resources register themselves with theManagedWebGLRenderingContext
. If the context is informed of a context loss and restoration, the registered WebGL resources'restore()
method is called. Therestore()
method implementation on each resource type will recreate the GPU side objects. - All classes that previously took a
WebGLRenderingContext
in the constructor now also allow aManagedWebGLRenderingContext
. This ensures existing applications do not break. - To use automatic context restauration:
- Create or fetch a canvas element from the DOM
- Instantiate a
ManagedWebGLRenderingContext
, passing the canvas to the constructor. This will setup aWebGLRenderingContext
internally and manage context loss/restoration. - Pass the
ManagedWebGLRenderingContext
to the constructors of classes that you previously passed aWebGLRenderingContext
to (AssetManager
,GLTexture
,Mesh
,Shader
,PolygonBatcher
,SceneRenderer
,ShapeRenderer
,SkeletonRenderer
,SkeletonDebugRenderer
).
- Added
- Fixed renderer to work with 3.6 changes.
- Added support for two color tinting.
- Improved performance by using
DYNAMIC_DRAW
for vertex buffer objects and fixing bug that copied to much data to the GPU each frame inPolygonBatcher
/Mesh
. - Added two color tinting support, enabled by default. You can disable it via the constructors of
SceneRenderer
,SkeletonRenderer
andPolygonBatcher
. Note that you will need to use a shader created viaShader.newTwoColoredTexturedShader
shader withSkeletonRenderer
andPolygonBatcher
if two color tinting is enabled. - Added clipping support
- Added
VertexEffect
interface, instances of which can be set onSkeletonRenderer
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
, and the example which allows to set effects. - Added
slotRangeStart
andslotRangeEnd
parameters toSkeletonRenderer#draw
andSceneRenderer#drawSkeleton
. This allows you to render only a range of slots in the draw order. Seespine-ts/webgl/tests/test-slot-range.html
for an example.
- Fixed renderer to work for 3.6 changes. Sadly, we can't support two color tinting via the Canvas API.
- Added support for shearing and non-uniform scaling inherited from parent bones.
- Added support for alpha tinting.
- Fixed renderer to work with 3.6 changes. Two color tinting is not supported.
- Added clipping support
- Added
VertexEffect
interface, instances of which can be set onSkeletonMesh
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
. - Added support for multi-page atlases
- Fixed WebGL context loss (see WebGL backend changes). Enabled automatically.
- Fixed renderer to work for 3.6 changes. Supports two color tinting & clipping (see WebGL backend changes for details).
- Added fields
atlasContent
,atlasPagesContent
, andjsonContent
toWidgetConfiguration
allowing you to directly pass the contents of the.atlas
, atlas page.png
files, and the.json
file without having to do a request. SeeREADME.md
and the example for details. SpineWidget.setAnimation()
now takes an additional optional parameter for callbacks when animations are completed/interrupted/etc.