[Help Needed] JoinRoom(); creates a room / Doesn't connect to already existing room
Hey,
So I have this very simple script that worked really well yesterday, but for some reasons today It doesn't want to connect to rooms that I create...
using UnityEngine.UI; using Photon.Pun; public class RoomManagement : MonoBehaviourPunCallbacks { public InputField createName, joinName; public void CreateRoom() { PhotonNetwork.CreateRoom(createName.text); } public void JoinRoom() { PhotonNetwork.JoinRoom(joinName.text); } public override void OnJoinedRoom() { PhotonNetwork.LoadLevel("Game"); } }
For example, I create on my first game instance a Room on the same Lobby in the same Region (eu) and it works fine
Then, on my second I try to join the room with the exact same name. But it just creates me a new one for some reasons...
I have no real idea on how to fix this issue, as I tried fixing the server, reimporting, creating multiple games and rewriting some scripts...
0
Answers
-
There seems to be no code that creates a room, should the entered room name not be found. This leads me to think your button calls
CreateRoom()
instead ofJoinRoom()
...?0