instantiated objects are not destroyed automatically when disconnected by timeout?

It seems like instantiated objects via network are not destroyed automatically when disconnected by timeout, not explicitly using 'Disconnect' function.

The 'OnPlayerLeftRoom' callback is called normally.

Is it right? Or it takes some time to be destroyed? Or Is there something wrong with me?

If it is exptected behavior, how can I destroy the remain objects that lose their owner?

Answers

  • Maybe you setRoomOptions.CleanupCacheOnLeave=false when creating a room? Otherwise, network instantiated objects should be cleaned up by default. Give it a go in a new, empty scene (after joining a room).