mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[ue] Closes #2537, null renderer object if UTrackEntry is destroyed.
This commit is contained in:
parent
879c7adb37
commit
8e28a32cf6
@ -82,6 +82,13 @@ void USpineSkeletonAnimationComponent::BeginPlay() {
|
||||
trackEntries.Empty();
|
||||
}
|
||||
|
||||
void UTrackEntry::BeginDestroy() {
|
||||
if (entry) {
|
||||
entry->setRendererObject(nullptr);
|
||||
}
|
||||
Super::BeginDestroy();
|
||||
}
|
||||
|
||||
void USpineSkeletonAnimationComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) {
|
||||
Super::Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
||||
|
||||
|
||||
@ -212,6 +212,8 @@ public:
|
||||
UPROPERTY(BlueprintAssignable, Category = "Components|Spine|TrackEntry")
|
||||
FSpineAnimationDisposeDelegate AnimationDispose;
|
||||
|
||||
virtual void BeginDestroy() override;
|
||||
|
||||
protected:
|
||||
spine::TrackEntry *entry = nullptr;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user