Alix OllivierA
Normal3d ago
7 replies
Alix Ollivier

How can we upgrade the room size?

I want to start with the smallest room size then grow it as we get players, and do it as seamlessly as possible.

I did one version that seemed to disconnect people but not reconnect them again, and Claude gave me the following.

What's the best practice for increasing the room size seamlessly?


/ Step 2: Perform seamless swap
// This transfers all RealtimeComponents to the new room
m_Realtime.room = newRealtime.room;

// Step 3: Disconnect the old Realtime instance (the new one is now the active one)
m_Realtime.Disconnect();

The problem: Assigning m_Realtime.room = newRealtime.room doesn't actually transfer the connection or RealtimeComponents. Then m_Realtime.Disconnect() disconnects the player, and newRealtimeGO gets destroyed - leaving everyone disconnected with no actual reconnection.

The "dual-connection seamless swap" pattern doesn't work this way in Normcore. The correct approach is simpler: disconnect from the old room and reconnect to the new tier using the existing Realtime instance.
Was this page helpful?