The host stops verifying its Unity Relay allocation once all player slots are filled. The Relay eventually expires. The next person who browses games triggers permanent deletion of the game listing from DynamoDB. Spectator games are the only case where this matters — they need to remain joinable after all player slots are taken.
UnityTransportComponent.OnUpdate() — host match verification loop:
if (!instance.AreAllPlayersConnected() && createdMatch != null)
{
VerifyHostMatch(OnLocalServerListed); // keeps relay alive, recreates if expired
}
else
{
Debug.Log("All players connected - skipping match verification");
}GameServerBehaviour.AreAllPlayersConnected() — only counts player slots, not observers:
return connectedPlayers.Count == base.LocalGame.getNumHumans();- Game created with
GAMEOPTION_ALLOW_OBSERVE. Host creates Unity Relay allocation, stores join code in DynamoDB. - All human player slots fill.
AreAllPlayersConnected()→true. - Host stops calling
VerifyHostMatch()(30-second periodic check skipped). VerifyHostMatchnormally: (a) heartbeats the Relay viaGetJoinCodeAsync/JoinAllocationAsync, (b) recreates the allocation if expired, (c) updates DynamoDB with fresh join codes.- Relay allocation expires. Existing player connections persist (established transport), but the join code in DynamoDB is now dead.
- Any client browses the game list →
VerifyGames()→VerifyJoinCode()tests the dead join code → fails. - Game permanently deleted from DynamoDB (
DeleteNetworkServerData+DeleteNetworkGameData). - Game gone from browser forever. No new spectators can find it.
NetworkGameStruct in DynamoDB has no observe field. RegisterNetworkGameData only reports numFreeSlots (player slots). Full games (numFreeSlots == 0) sort to bottom of browser with no indication spectators are welcome.
The verification skip condition needs to account for observer-enabled games:
if ((!instance.AreAllPlayersConnected() || gameAllowsObservers) && createdMatch != null)| File | What |
|---|---|
UnityTransportComponent.cs:65-89 |
Host verification loop (the bug) |
UnityTransportComponent.cs:146-201 |
OnLocalServerListed — relay recreation logic |
UnityTransportComponent.cs:470-510 |
VerifyGames — browser-side verification that triggers deletion |
UnityTransportComponent.cs:546-570 |
VerifyJoinCode — tests relay join code validity |
GameServerBehaviour.cs:1368-1374 |
AreAllPlayersConnected — player-only check |
GameServerBehaviour.cs:1387-1436 |
RegisterNetworkGameData — no observe flag in browser data |
CloudStorageAWS.cs:1021-1078 |
DynamoDB write (no TTL, deletion is explicit) |