Why PUN does not support communications between photon rooms?

Options
I think it is a very common feature, for example, two persons are friends but now they are not in the same photon room,I want to invite him to join my room.I need send him a message to tell in which photon room I am now, he can just click a button to join me automatically. Without the feature, we must implement the client and server logic by ourselves.

I want to know under what considerations this feature is not implemented?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited July 2019
    Options
    Hi @harlan,

    Photon's room based architecture is made this way.
    Use Photon Chat or another service for you want to have communication between users outside of the same Photon room.

    two persons are friends but now they are not in the same photon room,I want to invite him to join my room
    Since adding and removing friends is outside of Photon's scope, you can also use the same service that provides you this friendship system to handle invitations if possible. Otherwise, you could use what Photon already offers: FindFriends operation which tells you if your friend is in a room and which room. But if both friends are joined to two different rooms, it's up to you to decide who's gonna invite who.
  • ahaupa
    Options
    Hi @harlan,

    I had the same issue as you and I found a way to connect to the room where your friend is.

    The FindFriend function proposed by Photon is indeed working only when you are in the MasterServer and not in the GameServer... so you can know if your friend is connected and if he is already in a room when you are not yourself in a room.

    I have implemented a function in which you can join a friend in the room he has joined just by knowing his userID (using FindFriend and then the callback onFriendListUpdate which will give you all the info about the current connection of your friend).