Network destroy Instantiated : Player before ReconnectAndRejoin
Options
Hello,
I am using latest pun2 plugin for my Game.
I want when network got disconnected then reconnect with some reason or when i am switching wifi to mobile data then my player reconnect and rejoin the same game.
and for this i am using PhotonNetwork.ReconnectAndRejoin() in my 'GamePlay' Scene and it helps me to rejoin the same room but before rejoin my player got destroy.
i am having this debug in console:
Network destroy Instantiated Go: Player
Because of this my game functionalities are not working properly.
i don't want my player got disconnected before reconnectAndRejoin.
i am using these line of code in 'MenuScene' where i am creating room, so that player leaves for 60000ms in room.
RoomOptions roomOps = new RoomOptions() { IsVisible = true, IsOpen = true, MaxPlayers = (byte)roomSize };
roomOps.PlayerTtl = 60000;
roomOps.EmptyRoomTtl = 60000;
But doesn't work for me.
can anyone please share the sample code for the same?
Thanks
I am using latest pun2 plugin for my Game.
I want when network got disconnected then reconnect with some reason or when i am switching wifi to mobile data then my player reconnect and rejoin the same game.
and for this i am using PhotonNetwork.ReconnectAndRejoin() in my 'GamePlay' Scene and it helps me to rejoin the same room but before rejoin my player got destroy.
i am having this debug in console:
Network destroy Instantiated Go: Player
Because of this my game functionalities are not working properly.
i don't want my player got disconnected before reconnectAndRejoin.
i am using these line of code in 'MenuScene' where i am creating room, so that player leaves for 60000ms in room.
RoomOptions roomOps = new RoomOptions() { IsVisible = true, IsOpen = true, MaxPlayers = (byte)roomSize };
roomOps.PlayerTtl = 60000;
roomOps.EmptyRoomTtl = 60000;
But doesn't work for me.
can anyone please share the sample code for the same?
Thanks
0