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