mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 01:06:00 +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();
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@ -219,6 +219,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