diff --git a/spine-ue4/Content/Maps/example.umap b/spine-ue4/Content/Maps/example.umap index 4af6b28c7..c23f2cc55 100644 Binary files a/spine-ue4/Content/Maps/example.umap and b/spine-ue4/Content/Maps/example.umap differ diff --git a/spine-ue4/Content/SpineBoy/SpineboyBlueprint.uasset b/spine-ue4/Content/SpineBoy/SpineboyBlueprint.uasset new file mode 100644 index 000000000..c5029671a Binary files /dev/null and b/spine-ue4/Content/SpineBoy/SpineboyBlueprint.uasset differ diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp index de407bd8c..381eb7ff8 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp @@ -2,10 +2,15 @@ #define LOCTEXT_NAMESPACE "Spine" +void UTrackEntry::SetTrackEntry(spTrackEntry* entry) { + this->entry = entry; + entry->rendererObject = (void*)this; +} + void callback(spAnimationState* state, spEventType type, spTrackEntry* entry, spEvent* event) { USpineSkeletonAnimationComponent* component = (USpineSkeletonAnimationComponent*)state->rendererObject; - if (type == SP_ANIMATION_START) { + if (type == SP_ANIMATION_COMPLETE) { if (entry->rendererObject) { UTrackEntry* uEntry = (UTrackEntry*)entry->rendererObject; component->AnimationStartEvent.Broadcast(uEntry); diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h index 22b2c50cb..ad7a7c50a 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h @@ -19,10 +19,7 @@ public: spTrackEntry* entry = nullptr; - void SetTrackEntry(spTrackEntry* entry) { - this->entry = entry; - entry->rendererObject = (void*)this; - } + void SetTrackEntry(spTrackEntry* entry); UFUNCTION(BlueprintCallable, Category="Components|Spine") int GetTrackIndex() { return entry ? entry->trackIndex : 0; }