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:nullptr if needed:
2. Registering a Respawn Request
Once an actor is harvested, disabled, or visually removed, register it for respawn:Full Example
3. Implementing Respawn Callbacks
There are two ways to implement the callback in C++:Option A — Implement IRespawnable Interface (Recommended)
Header
Source
Option B — Supply a Custom Callback via Function Pointer
If you don’t want to use the interface: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 aULootComponent, the recommended pattern is:
On Harvest:
On Respawn:
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:8. Advanced — Custom Respawn Requests
Register a request where the target actor is different from callback actor:
- 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++:10. Best Practices (C++)
| Practice | Benefit |
|---|---|
Implement IRespawnable | Cleanest and safest integration |
| Hide + disable actor when harvested | Prevents player interaction or blocking |
| Keep respawn logic simple | Reduces errors during async callbacks |
Reset loot inside OnRespawnRequested | Ensures fresh rolls |
| Use component pointers instead of finds | Best performance |
| Don’t use timers yourself | Avoids duplication; subsystem handles timing |
| Use GUID override only if needed | Subsystem already generates GUIDs |