반응형
- 입장조건이 있는 방 만들기
void JoinOrCreateRoom()
{
RoomOptions roomOption = new RoomOptions();
roomOption.MaxPlayers = 2;
roomOption.CustomRoomPropertiesForLobby = new string[] { "difficulty" };
roomOption.CustomRoomProperties = new Hashtable() { { "difficulty", "easy" } };
PhotonNetwork.JoinOrCreateRoom("room name", roomOption, null);
}
- 조건에 맞는 방 참여하기
public void JoinRandomRoom()
{
Hashtable roomProperties = new Hashtable() { { "difficulty", "easy" } };
PhotonNetwork.JoinRandomRoom(roomProperties, 2);
}
반응형