UAbilitySystemComponent::DestroyActiveState() is called when the component is unregistered (OnUnregister) and when its destroyed (OnComponentDestroyed). It performs state cleanup such as canceling abilities and cleaning up ability instances.
The function sets a bool bDestroyActiveStateInitiated to true to ensure the cleanup is only done once. This is never set to false again.
This causes problems when the owning actor goes through a lifecycle where it will exit and re-enter play. Specifically, this causes problems when:
In both these cases the AbilitySystemComponent re-enters play but when removed again, DestroyActiveState() is skipped so abilities are not canceled and cleaned up.
Expected: DestroyActiveState() should perform cleanup whenever the actor is removed from play, not only the first time.
See attached repro project:
Expected: DestroyActiveState() should not be skipped even when the ASC re-enters play.
How does TextureRenderTarget2D get TArray<uint8> type data?
How to delete some elements correctly when deleting an array loop?
How do I set a material as a post-processing material?
Why does the REMOVE method of map container remove elements have memory leaks?
UMG RichText not appear image when packaged
How would I go about lerping the rotation instead of it snapping when turning (pls dont sue me epic)
my UEFN wont lunch it say Failed to open descriptor file ../../../FortniteGame/FortniteGame.uproject
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-199290 in the post.
0 |
Component | UE - Gameplay - Gameplay Ability System |
---|---|
Affects Versions | 5.3 |
Target Fix | 5.4 |
Fix Commit | 29311191 |
---|---|
Main Commit | 29311229 |
Created | Oct 30, 2023 |
---|---|
Resolved | Nov 1, 2023 |
Updated | Dec 1, 2023 |