Skip to main content
This page covers how to implement respawnable actors using C++ with the URespawnManagerSubsystem.
It includes full examples, best practices, and recommended patterns for resource nodes, foliage conversion, enemies, and custom gameplay actors.

1. Accessing the Respawn Manager (C++)

The Respawn Manager is a World Subsystem, so you can access it from any Actor:
Check for nullptr if needed:

2. Registering a Respawn Request

Once an actor is harvested, disabled, or visually removed, register it for respawn:

Full Example

This schedules the actor to receive a respawn callback after the delay has elapsed.

3. Implementing Respawn Callbacks

There are two ways to implement the callback in C++:

Source

The subsystem will automatically call your override.

Option B — Supply a Custom Callback via Function Pointer

If you don’t want to use the interface:
Custom function:
The interface method is still recommended for consistency.

4. Full Resource Node Example

Below is a complete resource node implementation including harvesting, disabling, and respawning.

ResourceNode.h


ResourceNode.cpp


5. Respawn Manager + LootComponent Example

If you attach a ULootComponent, the recommended pattern is:

On Harvest:

On Respawn:

The Respawn Manager does the timing.

6. Integration with Foliage Interaction (C++)

For foliage converted to temporary actors:

On Harvest:

On Respawn:


7. Respawning Enemies or AI

If enemies should respawn at spawn points:
Then implement:
Or use the interface.

8. Advanced — Custom Respawn Requests

Register a request where the target actor is different from callback actor:

Useful for:
  • Crop regrowth
  • Trap resetting
  • Multi-actor puzzle resets
  • Group respawn triggers

9. Advanced — Serialization & SaveSystem Integration

Respawn Manager uses GUIDs to ensure actors continue their respawn schedule across saves. If you want custom save behavior in C++:
This allows complete override of timing persistence.

10. Best Practices (C++)


11. Full Minimal Example (Copy-Paste Ready)

Header

Source