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
