Get # of subscribers in room, without joining the room.

Greetings,
I've managed to figure out that i can get a count of the currently joined chat rooms subscribers with these two lines of C# code:
int howmanyinthischannel = channel.Subscribers.Count;
Debug.Log(" This channel: " + channelName + " has this many subscribers: " + howmanyinthischannel);

That's great, but what I want to do ( I have 10 fixed rooms) is upon app startup, to query what rooms have how many subscribers...
Is this possible? (I'd like to find out how many people are in each room, and display it, so people can see if there's people in a room before joining. )

Thanks!

Comments

  • JohnTubeJohnTube mod
    edited November 1
    Hi @JustinTimeStudio,

    In Photon Chat, there are channels and not rooms.
    In Photon Realtime and PUN there are rooms.

    So I'm guessing you use a mirror Photon Chat channel per Photon Realtime room.

    In Photon Chat it's not possible to get the number of subscribers of a channel when not subscribed to it.
    In Photon Realtime, you could get the PlayersCount from rooms list when joined to a lobby with a proper type or using GetCustomGameList in SQL Lobby.
  • @JohnTube
    Hmm, I'm using Photon chat, but should have referred to "channels", not rooms. Thanks for the clarification and the information. My query is answered. :)
Sign In or Register to comment.