During a room change, is the RealtimeModel preserved?

Suppose this example:

Connecting to Room Foo.
Room Foo has RealtimeComponent with model. Model gets changed during runtime.
Connecting to Room Bar.
Disconnecting from Room Foo.

Will the model data be preserved?

Nope! all realtime prefabs are destroyed on disconnect and all models attached to RealtimeViews/RealtimeComponents on scene game objects are reset.


So, when I switch rooms, I have to manually migrate the Realtime views and components to the newly connected Room to persist the info stored in the model?

Just for the sake for clarity, I am connecting to a new room, and then disconnecting, not disconnecting and then connecting to a new Room. So the question is whether I’ll have to make the API call myself or whether an event will propagate the connection to the new Room.

Yes you would have to manually migrate any data you want to move between rooms. The whole point of separate rooms is to have separate state for each room. If we automatically copy state from a previous connection to a new one, then rooms will get clobbered as players move between spaces.