Home › Module plugins › AFM_AutoDestroy
Module
AFM_AutoDestroy
Destroys the owning actor when the actor it depends on is destroyed.
What it gives you
- Automatic cleanup of helper actors
- No manual lifetime tracking
Requires
None
1 assets1 API members
Description
Many framework systems spawn helper actors — motion controllers, previews, indicators, cursors — that
should not outlive whatever created them. BPC_AutoDestroy binds to the parent's destruction and
removes its owner, so no system has to track those lifetimes manually.
Setup
- Enable
AFM_AutoDestroy. - Add
BPC_AutoDestroyto any actor that should not outlive its parent.
Usage
Add the component and set the owning actor. When that actor is destroyed, this one follows. There is nothing to call.
Key properties
| Property | When to change |
|---|---|
| Owner | Set at spawn time by whatever creates the helper |
Extending
Not typically extended.
Example map
Present on BP_MotionController so hands clean up with the pawn.
Troubleshooting
Helper actors survive their parent. The component is missing, or the owner was never assigned at spawn.
API reference
Every blueprint asset in this plugin. Expand an asset to see its members.
Components
BPC_AutoDestroy1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| event | OnDestroyed_Event | (DestroyedActor: Actor) | Destroys the owning actor when the actor it depends on is destroyed. Used so helper actors such as motion controllers clean up with their pawn. |