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);
}
↧