playMaker

Author Topic: PUN: can't rejoin room  (Read 7491 times)

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
PUN: can't rejoin room
« on: August 14, 2017, 04:57:03 PM »

Here is my very simple setup:

1) network connect
2) create room with player ttl 60000 and no cleanup cache
3) leave room
4) rejoin the room

It seems to work, when the second player connected to the same room, but if I'm the only player who create and than leave the room - it's deleted immediately on leaving. Why it's happen? Shouldn't the room stay alive for 1 minute?
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: PUN: can't rejoin room
« Reply #1 on: August 14, 2017, 05:20:26 PM »
My bad, it can not ReJoin with the second user connected either. But with reason (User does not exist in this game)

So, it's different problem to solve.
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: PUN: can't rejoin room
« Reply #2 on: August 15, 2017, 06:17:36 AM »
hi, are you changing scenes?

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: PUN: can't rejoin room
« Reply #3 on: August 15, 2017, 08:36:33 AM »
No, everything happen in one scene in one same fsm.

Photon Network Connect Using Settings ->
Photon Network Create Room Advanced ->
Photon Network Leave Room ->
Photon Network Re Join Room ->
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PUN: can't rejoin room
« Reply #4 on: August 15, 2017, 08:49:42 AM »
Hi,

 do you have a room ttl as well?

Bye,

 Jean

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: PUN: can't rejoin room
« Reply #5 on: August 15, 2017, 10:08:20 AM »
do you have a room ttl as well?

I don't think so. I'm using default playmaker action Photon Network Create Room Advanced ans it have only player TTL option. (and no EmptyRoom.ttl either)

Although, I checked PUN forum and found some mention,that I need playerID to ReJoin the room. But the default playmaker action don't have any option except roomname.
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PUN: can't rejoin room
« Reply #6 on: August 16, 2017, 02:28:27 AM »
Hi,

Normally, if you have the latest version of PUN, you should not need it.

can you try with the action attached, it allows you to set the user Id.

If that still doesn't work, I'll work on this to make sure it works and send you a sample to show how to do it.

 Bye,

 Jean

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: PUN: can't rejoin room
« Reply #7 on: August 16, 2017, 06:33:33 PM »
Thanks for your effort! No, sorry, set user id didn't help.

Let me summarize what I have so far, maybe it could help a little. I made clean setup of the fresh Unity 2017.1 (but with 5.5.2.1f i had same results). Install most recent 1.8.5 Playmaker and 1.85 PUN, get the ecosystem and PUN actions.


Here is my scene, very simple. It's only couple of actions in one fsm:
1) Photon Network Connect Using Settings
2) Photon Network Create Room Advanced
3) Photon Network Leave Room
4) Photon Network Re Join Room
5) Photon Network Join Room
- for second player to join


I got 3 problems.

1. When you create room and then leave  - room disappear immediately.
I want to create room that will be alive specified amount of time even without players inside. I suppose roomOptions.EmptyRoomTTL should help, but current playmaker actions don't have this option.

2. When you leave the room with players, you can't rejoin back
Code: [Select]
Operation failed: OperationResponse 226: ReturnCode: 32748 (User does not exist in this game).

3. When second player connect to your room you get an error message
Code: [Select]
The observed monobehaviour (PlayMaker Photon Proxy) of this PhotonView does not implement OnPhotonSerializeView()!It happens only when you have an empty room. If you instantiate object and sync some values - you'll not have this error. Technically it's not a problem, but anyway it's a red exclamation mark in the log, so I'd better mention it.

Thank you very much for your time and help!
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PUN: can't rejoin room
« Reply #8 on: August 17, 2017, 04:13:44 AM »
Hi,

 ok, then yes, I need to expose roomTtl. I though it was exposed, I'll double check and also double check the process itself, maybe it's a combination of missing bits and bobs.

Bye,

 Jean

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: PUN: can't rejoin room
« Reply #9 on: August 29, 2017, 07:57:35 AM »
Hey! Any update on this topic?
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PUN: can't rejoin room
« Reply #10 on: August 31, 2017, 02:59:57 AM »
Hi,

 thanks for the bump, I need it :) getting on this right now,

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PUN: can't rejoin room
« Reply #11 on: August 31, 2017, 05:33:53 AM »
Hi,

 ok, done and verified. Please update pun from the ecosystem, I added the emptyRoomttl in CreateRoomAdvanced action.



you can download the test scene I used above here: https://github.com/jeanfabre/PlayMaker--ExitGames--PhotonUnityNetworking_U4.3.4/blob/master/PlayMakerPhotonRejoinTest.unitypackage?raw=true

 Let me know how this goes.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PUN: can't rejoin room
« Reply #12 on: August 31, 2017, 05:36:02 AM »
Hi,

 few things to clear things up:

 rejoin and reconnectAndRejoin do not work if you have left the room, you need to be disconnected for rejoining, else it won't work.

 this is typically used for device when your app goes in the background, you get disconnected, so when your app goes focused again you simply use ReconnectAndRejoin

Rejoin: I don't see much use apart form making sure you where actually in that room, else I would simply use JoinRoom because you anyway need to cache the name of  the room you were in to ba able to use rejoin properly.

 Bye,

 Jean

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: PUN: can't rejoin room
« Reply #13 on: August 31, 2017, 10:21:02 AM »
Oh, thanks a lot! Can't wait to check it myself!
indie developer of multiplayer adult fighting
http://nakedfighter3d.com