Joining a room fails every time NEED HELP unity
in my code i have a function and when called its supposed to join a room with the same name as the input field it looks like this
public void OnClickJoin()
{
PhotonNetwork.JoinRoom(JoinInputField.text);
}
and this is how I detect if joining a room fails
public override void OnJoinRoomFailed(short returnCode, string message)
{
Debug.Log("Joiningfailed");
}
There's no errors in the script I don't know what to do it doesn't make sense i can provide the full script if you want it
Best Answer
-
You need to register your script to get callbacks. In doubt, enable the "SupportLogger" in the PhotonServerSettings to get more log output. There is certainly some error callback or other info.
To join a room, it must be existing in the same region you use with "this" client. See Matchmaking Checklist.
Have a look at the script
ConnectAndJoinRandom
to get an idea of how to quickly get into a room.0
Answers
-
You need to register your script to get callbacks. In doubt, enable the "SupportLogger" in the PhotonServerSettings to get more log output. There is certainly some error callback or other info.
To join a room, it must be existing in the same region you use with "this" client. See Matchmaking Checklist.
Have a look at the script
ConnectAndJoinRandom
to get an idea of how to quickly get into a room.0 -
Thank you it the debug did not give any information but when i put it in a startfunctecion i fixed my problem but i found a new one get this error when i load into the game scene its prety long here it is
NullReferenceException: Object reference not set to an instance of an object
Photon.Pun.PhotonTransformViewClassic.OnPhotonSerializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs:128)
Photon.Pun.PhotonView.SerializeComponent (UnityEngine.Component component, Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:557)
Photon.Pun.PhotonView.SerializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:521)
Photon.Pun.PhotonNetwork.OnSerializeWrite (Photon.Pun.PhotonView view) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1723)
Photon.Pun.PhotonNetwork.RunViewUpdate () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1652)
Photon.Pun.PhotonHandler.LateUpdate () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:168)
Thank you
0