Photon Automatically Destroy Prefabs On Disconnected Side
RoomOptions :
Pun v2.22
Is there any way to keep photon instantiated prefab on disconnected side?
RoomOptions roomOps = new RoomOptions(); roomOps.IsVisible = true; roomOps.IsOpen = true; roomOps.MaxPlayers = 2; roomOps.PlayerTtl = 60000; roomOps.EmptyRoomTtl = 30000; roomOps.CleanupCacheOnLeave = false;
Pun v2.22
Is there any way to keep photon instantiated prefab on disconnected side?
0
Comments
It could be that you don't set those options in CreateRoom or something else could destroy the objects.
In a quick test, this worked for me in 2.27.
-room ops added with create room.
When I disconnect Photon player instantiated from me and other client player destroyed. But for other side(client) who still in the game both prefab there. Is this normal behaviour or do I need to update my pun package?
Edit: I checked on start both side CleanupCacheOnLeave and it's false
@Tobias
Does any code reload the scene, maybe?
Yes, you should update the PUN package.