diff --git a/CHANGELOG.md b/CHANGELOG.md index 685e8d3a8..9dfb9fea3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ * Removed `spBone_worldToLocalRotationX` and `spBone_worldToLocalRotationY`. Replaced by `spBone_worldToLocalRotation` (rotation given relative to x-axis, counter-clockwise, in degrees). * Replaced `r`, `g`, `b`, `a` fields with instances of new `spColor` struct in `spRegionAttachment`, `spMeshAttachment`, `spSkeleton`, `spSkeletonData`, `spSlot` and `spSlotData`. * Removed `spVertexIndex`from public API. + * Listeners on `spAnimationState` or `spTrackEntry` will now be also called in case a track entry is disposed as part of dispoing the `spAnimationState`. * **Additions** * Added support for local and relative transform constraint calculation, including additional fields in `spTransformConstraintData`. * Added `spPointAttachment`, additional method `spAtlasAttachmentLoadeR_newPointAttachment`. diff --git a/spine-c/spine-c/include/spine/dll.h b/spine-c/spine-c/include/spine/dll.h index df85643e5..ed9c328b5 100644 --- a/spine-c/spine-c/include/spine/dll.h +++ b/spine-c/spine-c/include/spine/dll.h @@ -45,4 +45,4 @@ #define SP_API SPINEPLUGIN_API #endif -#endif /* SPINE_SHAREDLIB_H */ \ No newline at end of file +#endif /* SPINE_SHAREDLIB_H */ diff --git a/spine-c/spine-c/src/spine/AnimationState.c b/spine-c/spine-c/src/spine/AnimationState.c index 33d3abba6..31d60ad4d 100644 --- a/spine-c/spine-c/src/spine/AnimationState.c +++ b/spine-c/spine-c/src/spine/AnimationState.c @@ -193,9 +193,13 @@ void _spAnimationState_disposeTrackEntries (spAnimationState* state, spTrackEntr spTrackEntry* from = entry->mixingFrom; while (from) { spTrackEntry* nextFrom = from->mixingFrom; + if (entry->listener) entry->listener(state, SP_ANIMATION_DISPOSE, from, 0); + if (state->listener) state->listener(state, SP_ANIMATION_DISPOSE, from, 0); _spAnimationState_disposeTrackEntry(from); from = nextFrom; } + if (entry->listener) entry->listener(state, SP_ANIMATION_DISPOSE, entry, 0); + if (state->listener) state->listener(state, SP_ANIMATION_DISPOSE, entry, 0); _spAnimationState_disposeTrackEntry(entry); entry = next; } diff --git a/spine-ue4/Source/SpineUE4/MySceneComponent.cpp b/spine-ue4/Source/SpineUE4/MySceneComponent.cpp index be783eb9e..21cbfceb6 100644 --- a/spine-ue4/Source/SpineUE4/MySceneComponent.cpp +++ b/spine-ue4/Source/SpineUE4/MySceneComponent.cpp @@ -11,9 +11,6 @@ UMySceneComponent::UMySceneComponent(const FObjectInitializer& ObjectInitializer // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features // off to improve performance if you don't need them. PrimaryComponentTick.bCanEverTick = true; - - // ... - spColor_create(); } diff --git a/spine-unity/Assets/spine-unity/Mesh Generation/SpineMesh.cs b/spine-unity/Assets/spine-unity/Mesh Generation/SpineMesh.cs index 16060da32..960abc265 100644 --- a/spine-unity/Assets/spine-unity/Mesh Generation/SpineMesh.cs +++ b/spine-unity/Assets/spine-unity/Mesh Generation/SpineMesh.cs @@ -265,7 +265,7 @@ namespace Spine.Unity { bool hasSeparators = separatorCount > 0; int clippingAttachmentSource = -1; - int lastPreActiveClipping = -1; + int lastPreActiveClipping = -1; // The index of the last slot that had an active ClippingAttachment. SlotData clippingEndSlot = null; int submeshIndex = 0; var drawOrderItems = drawOrder.Items; @@ -327,7 +327,7 @@ namespace Spine.Unity { } if (noRender) { - if (current.forceSeparate && generateMeshOverride && current.rawVertexCount > 0) { + if (current.forceSeparate && generateMeshOverride) { // && current.rawVertexCount > 0) { { // Add current.endSlot = i; current.preActiveClippingSlotSource = lastPreActiveClipping;