CreateRoom returns true but no rooms made?

edited April 2015 in DotNet
I attempt to create a room using the following code
public bool CreateMultiRoom(string Name, RoomOptions options, TypedLobby lobby = null) {          
    bool result = OpCreateRoom(Name, options, lobby);
    return result;
Which works fine in my GameScene test where the player(s) automatically join or create a room. I now wanted to create a section prior to this where users
can create rooms and join the ones available. So I setup a button and referenced the above method which returns true(The op worked correctly)! But when I check "RoomsCount" it returns 0 and so does RoomInfoList. Am I missing a step here? I've practically copied/altered the demo code and I'm not sure what's happening.

More Info:
In my lobby scene, at the end of the frame update I do call .Service();

The properties I am sending to the function are the following
bool createRoom = Logic.Instance.Client.CreateMultiRoom("game_"+room_name, new RoomOptions() 
                                        {MaxPlayers = 2, IsOpen = true, EmptyRoomTtl = Int16.MaxValue, IsVisible = true});
//room_name is just a randomly generated number

Also another question If I created these rooms on Client 1, would Client 2 be able to see them? If not, how would I sync the rooms up? I am using Photon Realtime for this project.


  • Creating a room will join it automatically. The room count won't change anymore because you're then on the Game Server and that doesn't send it (as it doesn't know).
    New rooms should show up in the lobby after a moment. They can be listed (when the client is in the lobby) or joined randomly, unless full or hidden.
  • Ah thanks, was a simple overlook in the end - Always is. Could you further expand on RoomInfoList and how it is meant to work? Looking through the demos (Unity GUI, DotNot etc) doesn't seem to be clear enough. Nevermind Think I've got it now :) (Underline is meant to replace strike through!)

    So testing has some weird results, if I open up a single client everything works fine. But when I open up a second client things get a bit weird. It recognises that rooms (using "RoomsCount;" exist(ed) prior to this user opening the client, but if I call "RoomInfoList.Count > 0" I get a result being no rooms in the list which I can understand why - the new client needs to receive the data for the rooms already created. What is the method to do this? Do I send a OpRaiseEvent passing in that particulars roomlist and do a this.roomInfoList = photonEvent[InfoList]; but I can see issues with this (Which client has the most up-to-date information?)
  • You get some stats while you are on the Master Server. This is automatic and explains how RoomsCount gets updated.
    The roomInfoList is only available when you are in a lobby and when someone created a room in that lobby. You get into a lobby by OpJoinLobby() and while you're in there, you will get automatic updates.
Sign In or Register to comment.