- Home /
Unity Photon Create a Passworded Room and join?
Hey gang, I've sucsefully created a Joinrandomroom Team lobby setup for my main game that works now I'm trying to setup a 1v1 Format.
public string roomName = ""; public string roomPass = ""; public Text Pass; public Text Name;
public void RoomName(){ roomName = Name.text; roomPass = Pass.text; }
I started by putting the Pass and the Name of the room into a string and I have created the Room But I'm having trouble adding a Password and Joining that Room.
public void CreateRoom()
{
RoomOptions roomOptions = new RoomOptions () { isVisible = true, maxPlayers = 2 };
Debug.Log("OnPhotonRandomJoinFailed() was called by PUN. No random room available, so we create one. Calling: PhotonNetwork.CreateRoom(null, new RoomOptions() {maxPlayers = 4}, null);");
PhotonNetwork.JoinOrCreateRoom (roomName, roomOptions, TypedLobby.Default);
}
public void JoinRoom (){ PhotonNetwork.JoinRoom(Name);
}
Your answer
Follow this Question
Related Questions
Photon room name issue 0 Answers
Photon Join room (Not Random Room) 1 Answer
How to get all created rooms and join any one of them in PHOTON 2 Answers
Join room and create if not existing. 0 Answers
PhotonNetwork.Instantiate 2 problems. 3 Answers