public static void CreateRoom(string roomName)
{
Debug.Log("this custom props " + player.customProperties.ToStringFull());
if (connectionStateDetailed == PeerState.ConnectedToGameserver || connectionStateDetailed == PeerState.Joining || connectionStateDetailed == PeerState.Joined)
{
Debug.LogError("CreateRoom aborted: You are already connecting to a room!");
}
else if (room != null)
{
Debug.LogError("CreateRoom aborted: You are already in a room!");
}
else
{
if (offlineMode)
{
offlineMode_inRoom = true;
NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnCreatedRoom);
NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnJoinedRoom);
}
else
{
networkingPeer.OpCreateGame(roomName, true, true, 0, autoCleanUpPlayerObjects, null, null);
}
}
}