Skip to main content

Blueprint Overview

Everything you need for host migration works without C++.

State​

Tick SaveGame on Blueprint variables (variable details → Advanced → SaveGame). They travel like UPROPERTY(SaveGame) in C++, on actors and components alike, including object references to other migrated actors.

Add the Host Migration Id component to every actor that should survive.

Subsystem​

Get it with Get HostMigrationSubsystem (it's a GameInstance subsystem).

NodeWhat it does
Leave SessionLeave the match. On the host, hands it over first.
Begin Graceful MigrationHost: send a final snapshot and tell everyone to migrate now.
Get StateCurrent state.
Is MigratingTrue during a migration (not Running, not Failed).
Is Local HostTrue on the machine that hosts.
Get EpochIncreases with each migration.
Get Status TextLocalized status line for UI.
Get Num Players AwaitedPlayers the new host is still waiting for.
Get Host AddressAddress of the current host.
Find Host In LobbyFor players not connected yet: where the current host is.
Get Num Inactive PlayersHost: players whose state is kept for a rejoin.
Get Snapshot StatsHost: snapshot sizes and traffic.

Subsystem events​

EventWhen
On State Changed (Old State, New State)Every state change, on every machine.
On Player Restored (Player Controller)Host: a returning player got their state back.
On Host Changed (Host Id, Host Address, Is Local Host, Epoch)The session has a new host. Use it to update lobby data or rich presence.

Library nodes​

NodeWhat it does
Get Migration IdThe id that identifies an actor across migrations.
Find Actor By Migration IdThe actor that carries an id now.
Is Host Migration In ProgressSame as Is Migrating, from any world context.
Is Migration HostTrue on the machine that hosts.
Unique Net Id To StringThe string form used for player ids.

Steam​

Get Steam Lobby and Set Steam Lobby (only to override the detected lobby). See Steam.