Quick Start
1. Pick the adapter
Project Settings → Plugins → Host Migration → Adapter Class
- Steam Lobby for Steam. See Steam.
- Null for LAN and local testing.
- Your own Blueprint or C++ adapter for anything else.
Or in Config/DefaultGame.ini:
[/Script/HostMigrationCore.HostMigrationSettings]
AdapterClass=/Script/HostMigrationCoreSteam.HostMigrationAdapter_Steam
2. Set a wait map
Create an empty map and set it as Client Wait Map. Clients load it while the new host starts up. Without it they wait in the game's default map, usually the main menu.
3. Mark actors that should survive
Add the Host Migration Id component to every actor that should be carried over, including the player pawn. PlayerStates, the GameState and the GameMode are always carried over and don't need it.
4. Mark the state to carry over
Tick SaveGame on each variable that should survive (variable details → Advanced → SaveGame). In C++:
UPROPERTY(SaveGame)
int32 Score = 0;
Components with SaveGame variables are saved with their actor.
5. Let the host leave properly
When the host quits on purpose, call Leave Session instead of open <map>. The match continues on another
player's machine.
That's it. Crash the host (or close it) and the match continues on one of the other players.
Next steps
- How it works: what happens during a migration.
- Events: restart timers and effects after a migration.
- Plugin Settings: timings, pause, overlay.
- Testing: try it locally.