1

I have a problem in my game, I have created room and allow 2 users to enter as follows

if(GUI.Button (new Rect(220,300,120,20), "Create Room"))
{   
    RoomSettings settings = new RoomSettings(roomName);   
    settings.MaxSpectators = 1;  
    settings.MaxUsers = 2;  
    settings.Name = roomName;  
    settings.Variables.Add(new SFSRoomVariable("AceOnAce", GameLogics.AceOnAce));
    settings.Variables.Add(new SFSRoomVariable("NoTrickWithAce", GameLogics.NoTricksWithAce));
    settings.Extension = new RoomExtension(extensionId, extensionClass);  
    NetworkCon.sfs.Send(new CreateRoomRequest(settings, true, NetworkCon.sfs.LastJoinedRoom));
}  

and in onRoomAdded method

public void OnRoomAdded(BaseEvent evt) 
{   
    Debug.Log ("Created");  
    Room room = (Room)evt.Params["room"];  
    //room.IsGame = true;  
    if ( room.IsGame ) 
    {  
        SetupRoomList();  
    }  
    room.GetVariables ();  
    Debug.Log (room.Name);
}

My problem is that I can't see both users when I create room myself, But both users are displayed when I join a room created by other user. It looks like onJoinRoom is working fine but problem must be in create room. Please help Thanks.

Mo Patel
  • 2,321
  • 4
  • 22
  • 37
allrounder
  • 49
  • 6

0 Answers0