I am instantiating prefabs using PhotoNetwork.Instantiate. The problem is when the player who instantiated the objects leaves or disconnects the objects are destroyed for other players as well. Is there anyway to fix this ? I can use Remote procedure calls but my first priority is somehow fix this. I am new to photon pun but so far I've learned a lot. Any help will be appreciated. PS. the master client is network instantiating.
PhotonNetwork.Instantiate destroying instantiated objects when owner leaves
2.4k Views Asked by AudioBubble At
2
This is the default behaviour by design, read here or here.
You can change it by setting
RoomOptions.CleanupCacheOnLeave
tofalse
when creating rooms. You will have to do the manual clean up later by usingPhotonNetwork.Destroy
methods.