We’ve just pushed an updated Host Migration system to the staging branch.
A graceful departure (disconnect or exit) now transfers the game state to another player.
As a rule of thumb: synced state moves to the new host. Code queued on the old host (async work, timers, etc.) does not.
A graceful departure (disconnect or exit) now transfers the game state to another player.
As a rule of thumb: synced state moves to the new host. Code queued on the old host (async work, timers, etc.) does not.
- If your state survives a late join, it should also survive host migration.
- Timers and async work may need to be represented as synced state to migrate cleanly.
- We’ve added a few code analyzers to help make your game host migration ready.
You can read more in the Host Migration documentation.
To opt out of Host Migration, set
To opt out of Host Migration, set
DestroyWhenHostLeaves to true in your project settings.This only handles graceful disconnects for now (host leaving or closing the game).
This does not yet handle crashes or lost connections, but we will likely look into this in the future.
This does not yet handle crashes or lost connections, but we will likely look into this in the future.
This only handles graceful disconnects for now (host leaving or closing the game).
This does not yet handle crashes or lost connections, but we will likely look into this in the future.
This does not yet handle crashes or lost connections, but we will likely look into this in the future.