Hi ... I don't know how to get the RoomList and the number if players on the room . I tried to use the functions but i had some errors and had no result . Any one please can help me and give me a simple example about how to use it . I am using photon pun 2 .
Some errors is too vague to help properly but here's some doc that may do the trick: https://doc.photonengine.com/en-us/pun/current/manuals-and-demos/matchmaking-and-lobby
ok let me so ask you please about RPC public override void OnJoinedRoom() { Debug.Log("4-State is: " + PhotonNetwork.NetworkClientState.ToString()); parents = PhotonNetwork.Instantiate("My_View", new Vector3(0, 0.5f, 0), Quaternion.identity, 0); parents.transform.SetParent(source.transform); pv = parents.GetComponent<PhotonView>(); if (pv.IsMine && Load_Rooms.Player_Name=="tamim") pv.RPC("Reg_Room", RpcTarget.OthersBuffered, Load_Rooms.ClientRoomName, Load_Rooms.ClientRoomSize, Load_Rooms.ClintRoomPassword, Load_Rooms.ClientRoomCoast, Load_Rooms.MasterConfirmCode); Debug.Log("Name: " + Load_Rooms.ClientRoomName + " Password: " + Load_Rooms.ClintRoomPassword + " Confirm: " + Load_Rooms.MasterConfirmCode); } [PunRPC] public void Reg_Room (string RN,int RS,string RP,int RC,string MCC) { Debug.Log("5-State is: " + PhotonNetwork.NetworkClientState.ToString()); if (Load_Rooms.ClientConfirmCode == MCC) { Load_Rooms.ClientRoomName = RN; Load_Rooms.ClientRoomSize = RS; Load_Rooms.ClintRoomPassword = RP; Load_Rooms.ClientRoomCoast = RC; Create_Room_Is_OK = true; PhotonNetwork.LeaveRoom(); } } .doesnt work ; the variables on the clients doesnt change ... why ?
I'm sorry but I can't debug your code and don't see the problem without that. In cases like this: Try to scale back and try to implement a minimal case to check what's working and what isn't. The Basics Tutorial could be a good guide for starters. Read and code along. It uses RPCs, too.
Ok NP. in a case that i have create a room and entered the room .. and i have a Variable X for each player .. i want to change for every player enter room the value of X . i cant do that . cause i am new on multiplyer programming :-(